Guest User

sub_140001150

a guest
Aug 20th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.51 KB | None | 0 0
  1. .text:0000000140001150 sub_140001150 proc near ; CODE XREF: wWinMain+48↓p
  2. .text:0000000140001150 ; DATA XREF: .rdata:0000000140010AD8↓o ...
  3. .text:0000000140001150
  4. .text:0000000140001150 dwCreationDisposition= dword ptr -38h
  5. .text:0000000140001150 dwFlagsAndAttributes= dword ptr -30h
  6. .text:0000000140001150 hTemplateFile = qword ptr -28h
  7. .text:0000000140001150 var_18 = qword ptr -18h
  8. .text:0000000140001150 NumberOfBytesWritten= dword ptr 8
  9. .text:0000000140001150 arg_8 = qword ptr 10h
  10. .text:0000000140001150 arg_10 = qword ptr 18h
  11. .text:0000000140001150
  12. .text:0000000140001150 push rbx
  13. .text:0000000140001152 push rdi
  14. .text:0000000140001153 sub rsp, 48h
  15. .text:0000000140001157 xor ebx, ebx
  16. .text:0000000140001159 xor ecx, ecx ; lpModuleName
  17. .text:000000014000115B mov [rsp+58h+NumberOfBytesWritten], ebx
  18. .text:000000014000115F call cs:GetModuleHandleA
  19. .text:0000000140001165 mov rdi, rax
  20. .text:0000000140001168 test rax, rax
  21. .text:000000014000116B jnz short loc_14000118F
  22. .text:000000014000116D call cs:GetLastError
  23. .text:0000000140001173 mov ebx, eax
  24. .text:0000000140001175 test eax, eax
  25. .text:0000000140001177 jle loc_1400012CE
  26. .text:000000014000117D movzx ebx, ax
  27. .text:0000000140001180 or ebx, 80070000h
  28. .text:0000000140001186 mov eax, ebx
  29. .text:0000000140001188 add rsp, 48h
  30. .text:000000014000118C pop rdi
  31. .text:000000014000118D pop rbx
  32. .text:000000014000118E retn
  33. .text:000000014000118F ; ---------------------------------------------------------------------------
  34. .text:000000014000118F
  35. .text:000000014000118F loc_14000118F: ; CODE XREF: sub_140001150+1B↑j
  36. .text:000000014000118F lea r8, Type ; "CONFIG"
  37. .text:0000000140001196 mov edx, 65h ; 'e' ; lpName
  38. .text:000000014000119B mov rcx, rax ; hModule
  39. .text:000000014000119E
  40. .text:000000014000119E loc_14000119E: ; DATA XREF: .rdata:0000000140010AD8↓o
  41. .text:000000014000119E ; .rdata:0000000140010B34↓o ...
  42. .text:000000014000119E mov [rsp+58h+arg_10], rsi
  43. .text:00000001400011A3 call cs:FindResourceA
  44. .text:00000001400011A9 mov rsi, rax
  45. .text:00000001400011AC test rax, rax
  46. .text:00000001400011AF jz short loc_1400011CE
  47. .text:00000001400011B1 mov rdx, rax ; hResInfo
  48. .text:00000001400011B4 mov rcx, rdi ; hModule
  49. .text:00000001400011B7 call cs:SizeofResource
  50. .text:00000001400011BD mov rdx, rsi ; hResInfo
  51. .text:00000001400011C0 mov rcx, rdi ; hModule
  52. .text:00000001400011C3 call cs:LoadResource
  53. .text:00000001400011C9 test rax, rax
  54. .text:00000001400011CC jnz short loc_1400011F5
  55. .text:00000001400011CE
  56. .text:00000001400011CE loc_1400011CE: ; CODE XREF: sub_140001150+5F↑j
  57. .text:00000001400011CE call cs:GetLastError
  58. .text:00000001400011D4 mov ebx, eax
  59. .text:00000001400011D6 test eax, eax
  60. .text:00000001400011D8 jle loc_1400012C9
  61. .text:00000001400011DE mov rsi, [rsp+58h+arg_10]
  62. .text:00000001400011E3 movzx ebx, ax
  63. .text:00000001400011E6 or ebx, 80070000h
  64. .text:00000001400011EC mov eax, ebx
  65. .text:00000001400011EE add rsp, 48h
  66. .text:00000001400011F2 pop rdi
  67. .text:00000001400011F3 pop rbx
  68. .text:00000001400011F4 retn
  69. .text:00000001400011F5 ; ---------------------------------------------------------------------------
  70. .text:00000001400011F5
  71. .text:00000001400011F5 loc_1400011F5: ; CODE XREF: sub_140001150+7C↑j
  72. .text:00000001400011F5 ; DATA XREF: .rdata:0000000140010AE8↓o ...
  73. .text:00000001400011F5 mov rcx, rax ; hResData
  74. .text:00000001400011F8
  75. .text:00000001400011F8 loc_1400011F8: ; DATA XREF: .rdata:0000000140010AE8↓o
  76. .text:00000001400011F8 ; .rdata:0000000140010AF8↓o ...
  77. .text:00000001400011F8 mov [rsp+58h+var_18], r12
  78. .text:00000001400011FD call cs:LockResource
  79. .text:0000000140001203 mov r12, rax
  80. .text:0000000140001206 test rax, rax
  81. .text:0000000140001209 jnz short loc_140001229
  82. .text:000000014000120B call cs:GetLastError
  83. .text:0000000140001211 mov ebx, eax
  84. .text:0000000140001213 test eax, eax
  85. .text:0000000140001215 jle loc_1400012C4
  86. .text:000000014000121B movzx ebx, ax
  87. .text:000000014000121E or ebx, 80070000h
  88. .text:0000000140001224 jmp loc_1400012C4
  89. .text:0000000140001229 ; ---------------------------------------------------------------------------
  90. .text:0000000140001229
  91. .text:0000000140001229 loc_140001229: ; CODE XREF: sub_140001150+B9↑j
  92. .text:0000000140001229 xor r9d, r9d ; lpSecurityAttributes
  93. .text:000000014000122C mov [rsp+58h+hTemplateFile], rbx ; hTemplateFile
  94. .text:0000000140001231 lea rcx, FileName ; "brbconfig.tmp"
  95. .text:0000000140001238 lea r8d, [r9+1] ; dwShareMode
  96. .text:000000014000123C mov edx, 0C0000000h ; dwDesiredAccess
  97. .text:0000000140001241 mov [rsp+58h+dwFlagsAndAttributes], ebx ; dwFlagsAndAttributes
  98. .text:0000000140001245
  99. .text:0000000140001245 loc_140001245: ; DATA XREF: .rdata:0000000140010AF8↓o
  100. .text:0000000140001245 ; .rdata:0000000140010B0C↓o ...
  101. .text:0000000140001245 mov [rsp+58h+arg_8], rbp
  102. .text:000000014000124A mov [rsp+58h+dwCreationDisposition], 2 ; dwCreationDisposition
  103. .text:0000000140001252 call cs:CreateFileA
  104. .text:0000000140001258 mov rbp, rax
  105. .text:000000014000125B cmp rax, 0FFFFFFFFFFFFFFFFh
  106. .text:000000014000125F jnz short loc_140001278
  107. .text:0000000140001261 call cs:GetLastError
  108. .text:0000000140001267 mov ebx, eax
  109. .text:0000000140001269 test eax, eax
  110. .text:000000014000126B jle short loc_1400012BF
  111. .text:000000014000126D movzx ebx, ax
  112. .text:0000000140001270 or ebx, 80070000h
  113. .text:0000000140001276 jmp short loc_1400012BF
  114. .text:0000000140001278 ; ---------------------------------------------------------------------------
  115. .text:0000000140001278
  116. .text:0000000140001278 loc_140001278: ; CODE XREF: sub_140001150+10F↑j
  117. .text:0000000140001278 mov rdx, rsi ; hResInfo
  118. .text:000000014000127B mov rcx, rdi ; hModule
  119. .text:000000014000127E call cs:SizeofResource
  120. .text:0000000140001284 lea r9, [rsp+58h+NumberOfBytesWritten] ; lpNumberOfBytesWritten
  121. .text:0000000140001289 mov rdx, r12 ; lpBuffer
  122. .text:000000014000128C mov rcx, rbp ; hFile
  123. .text:000000014000128F mov r8d, eax ; nNumberOfBytesToWrite
  124. .text:0000000140001292 mov qword ptr [rsp+58h+dwCreationDisposition], rbx ; lpOverlapped
  125. .text:0000000140001297 call cs:WriteFile
  126. .text:000000014000129D test eax, eax
  127. .text:000000014000129F jnz short loc_1400012B6
  128. .text:00000001400012A1 call cs:GetLastError
  129. .text:00000001400012A7 mov ebx, eax
  130. .text:00000001400012A9 test eax, eax
  131. .text:00000001400012AB jle short loc_1400012B6
  132. .text:00000001400012AD movzx ebx, ax
  133. .text:00000001400012B0 or ebx, 80070000h
  134. .text:00000001400012B6
  135. .text:00000001400012B6 loc_1400012B6: ; CODE XREF: sub_140001150+14F↑j
  136. .text:00000001400012B6 ; sub_140001150+15B↑j
  137. .text:00000001400012B6 mov rcx, rbp ; hObject
  138. .text:00000001400012B9 call cs:CloseHandle
  139. .text:00000001400012BF
  140. .text:00000001400012BF loc_1400012BF: ; CODE XREF: sub_140001150+11B↑j
  141. .text:00000001400012BF ; sub_140001150+126↑j
  142. .text:00000001400012BF mov rbp, [rsp+58h+arg_8]
  143. .text:00000001400012C4
  144. .text:00000001400012C4 loc_1400012C4: ; CODE XREF: sub_140001150+C5↑j
  145. .text:00000001400012C4 ; sub_140001150+D4↑j
  146. .text:00000001400012C4 ; DATA XREF: ...
  147. .text:00000001400012C4 mov r12, [rsp+58h+var_18]
  148. .text:00000001400012C9
  149. .text:00000001400012C9 loc_1400012C9: ; CODE XREF: sub_140001150+88↑j
  150. .text:00000001400012C9 ; DATA XREF: .pdata:0000000140016048↓o ...
  151. .text:00000001400012C9 mov rsi, [rsp+58h+arg_10]
  152. .text:00000001400012CE
  153. .text:00000001400012CE loc_1400012CE: ; CODE XREF: sub_140001150+27↑j
  154. .text:00000001400012CE ; DATA XREF: .pdata:0000000140016054↓o ...
  155. .text:00000001400012CE mov eax, ebx
  156. .text:00000001400012D0 add rsp, 48h
  157. .text:00000001400012D4 pop rdi
  158. .text:00000001400012D5 pop rbx
  159. .text:00000001400012D6 retn
  160. .text:00000001400012D6 sub_140001150 endp
Advertisement
Add Comment
Please, Sign In to add comment