Function at 0x402050
Capabilities:
Copy file
Get common file path
Read file on windows

Disassembly:
sub esp, 0x328
mov eax, dword [0x40e0bc]
xor eax, esp
mov dword [esp + 0x324], eax
push ebx
xor ebx, ebx
push ebp
push esi
mov esi, 0xf
push 0x104
lea eax, [esp + 0x12c]
push eax
push ebx
mov dword [esp + 0x130], esi
mov dword [esp + 0x12c], ebx
mov byte [esp + 0x11c], bl
mov dword [esp + 0xdc], esi
mov dword [esp + 0xd8], ebx
mov byte [esp + 0xc8], bl
mov dword [esp + 0xf8], esi
mov dword [esp + 0xf4], ebx
mov byte [esp + 0xe4], bl
mov dword [esp + 0x114], esi
mov dword [esp + 0x110], ebx
mov byte [esp + 0x100], bl
mov dword [esp + 0x88], esi
mov dword [esp + 0x84], ebx
mov byte [esp + 0x74], bl
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa0], ebx
mov byte [esp + 0x90], bl
mov dword [esp + 0xc0], esi
mov dword [esp + 0xbc], ebx
mov byte [esp + 0xac], bl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, 0x104
jb 0x402247
mov ebp, 0x10
cmp dword [esp + 0xb4], ebp
jb 0x40213b
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x98], ebp
mov dword [esp + 0xb4], esi
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], bl
jb 0x402169
mov edx, dword [esp + 0x84]
push edx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x7c], ebp
mov dword [esp + 0x98], esi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
jb 0x402191
mov eax, dword [esp + 0x68]
push eax
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x108], ebp
mov dword [esp + 0x7c], esi
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], bl
jb 0x4021b6
mov ecx, dword [esp + 0xf4]
push ecx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0xec], ebp
mov dword [esp + 0x108], esi
mov dword [esp + 0x104], ebx
mov byte [esp + 0xf4], bl
jb 0x4021e4
mov edx, dword [esp + 0xd8]
push edx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0xd0], ebp
mov dword [esp + 0xec], esi
mov dword [esp + 0xe8], ebx
mov byte [esp + 0xd8], bl
jb 0x402212
mov eax, dword [esp + 0xbc]
push eax
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x124], ebp
mov dword [esp + 0xd0], esi
mov dword [esp + 0xcc], ebx
mov byte [esp + 0xbc], bl
jb 0x402240
mov ecx, dword [esp + 0x110]
push ecx
call fcn.00402f47
add esp, 4
xor eax, eax
jmp 0x402a52
lea eax, [esp + 0x128]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x402251
sub eax, edx
push eax
lea edx, [esp + 0x12c]
push edx
lea ecx, [esp + 0x114]
call fcn.00401b50
push 1
push 0xffffffffffffffff
push 0x40b20c
lea ecx, [esp + 0x118]
call fcn.00401350
push eax
push ebx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x118]
call fcn.00401ee0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x118]
call fcn.00401a70
mov ebp, 0x10
cmp dword [esp + 0x24], ebp
jb 0x4022c1
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00402f47
add esp, 4
lea edx, [esp + 0x128]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x402405
cmp dword [esp + 0xb4], ebp
jb 0x4022f5
mov eax, dword [esp + 0xa0]
push eax
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x98], ebp
mov dword [esp + 0xb4], esi
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], bl
jb 0x402323
mov ecx, dword [esp + 0x84]
push ecx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x7c], ebp
mov dword [esp + 0x98], esi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
jb 0x40234b
mov edx, dword [esp + 0x68]
push edx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x108], ebp
mov dword [esp + 0x7c], esi
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], bl
jb 0x402370
mov eax, dword [esp + 0xf4]
push eax
call fcn.00402f47
add esp, 4
cmp dword [esp + 0xec], ebp
mov dword [esp + 0x108], esi
mov dword [esp + 0x104], ebx
mov byte [esp + 0xf4], bl
jb 0x40239e
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0xd0], ebp
mov dword [esp + 0xec], esi
mov dword [esp + 0xe8], ebx
mov byte [esp + 0xd8], bl
jb 0x4023cc
mov edx, dword [esp + 0xbc]
push edx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x124], ebp
mov dword [esp + 0xd0], esi
mov dword [esp + 0xcc], ebx
mov byte [esp + 0xbc], bl
jb 0x402240
mov eax, dword [esp + 0x110]
push eax
call fcn.00402f47
add esp, 4
xor eax, eax
jmp 0x402a52
lea eax, [esp + 0x128]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x402410
sub eax, edx
push eax
lea ecx, [esp + 0x12c]
push ecx
lea ecx, [esp + 0xdc]
call fcn.00401b50
push str.seagate
lea edx, [esp + 0xd8]
push edx
lea eax, [esp + 0x14]
push eax
call fcn.00401f90
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xfc]
call fcn.00401a70
cmp dword [esp + 0x24], ebp
jb 0x40246d
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00402f47
add esp, 4
push edi
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push str.SeagateRegistration_setup.cfg
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4025bd
cmp dword [esp + 0xb8], ebp
jb 0x4024a8
mov edx, dword [esp + 0xa4]
push edx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x9c], ebp
mov dword [esp + 0xb8], esi
mov dword [esp + 0xb4], ebx
mov byte [esp + 0xa4], bl
jb 0x4024d6
mov eax, dword [esp + 0x88]
push eax
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x80], ebp
mov dword [esp + 0x9c], esi
mov dword [esp + 0x98], ebx
mov byte [esp + 0x88], bl
jb 0x402501
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x10c], ebp
mov dword [esp + 0x80], esi
mov dword [esp + 0x7c], ebx
mov byte [esp + 0x6c], bl
jb 0x402529
mov edx, dword [esp + 0xf8]
push edx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0xf0], ebp
mov dword [esp + 0x10c], esi
mov dword [esp + 0x108], ebx
mov byte [esp + 0xf8], bl
jb 0x402557
mov eax, dword [esp + 0xdc]
push eax
call fcn.00402f47
add esp, 4
cmp dword [esp + 0xd4], ebp
mov dword [esp + 0xf0], esi
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], bl
jb 0x402585
mov ecx, dword [esp + 0xc0]
push ecx
call fcn.00402f47
add esp, 4
cmp dword [esp + 0x128], ebp
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
jb 0x4025b3
mov edx, dword [esp + 0x114]
push edx
call fcn.00402f47
add esp, 4
mov eax, 1
jmp 0x402a51
push ebx
lea eax, [esp + 0x30]
push eax
push 0x104
lea ecx, [esp + 0x23c]
push ecx
push edi
mov dword [esp + 0x40], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4025ea
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x402645
lea ecx, [esp + 0xa0]
call fcn.004017d0
lea ecx, [esp + 0x84]
call fcn.004017d0
lea ecx, [esp + 0x68]
call fcn.004017d0
lea ecx, [esp + 0xf4]
call fcn.004017d0
lea ecx, [esp + 0xd8]
call fcn.004017d0
lea ecx, [esp + 0xbc]
call fcn.004017d0
lea ecx, [esp + 0x110]
call fcn.004017d0
mov eax, 1
jmp 0x402a51
lea edx, [esp + 0x230]
push edx
lea ecx, [esp + 0x6c]
call fcn.00401f60
push ebx
push str.Reg
lea ecx, [esp + 0x70]
call fcn.004014e0
push ebx
push str..exe
lea ecx, [esp + 0x70]
mov esi, eax
call fcn.004014e0
cmp esi, 0x104
lea ecx, [esp + 0x68]
jae 0x4026ab
sub eax, esi
push eax
add esi, 4
push esi
lea eax, [esp + 0x18]
push eax
call fcn.00401ee0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x74]
call fcn.00401a70
lea ecx, [esp + 0x10]
call fcn.004017d0
jmp 0x4026b0
call fcn.00401e40
lea ecx, [esp + 0x230]
push ecx
lea ecx, [esp + 0xa4]
call fcn.00401f60
push ebx
push 0x40b1d0
lea ecx, [esp + 0xa8]
call fcn.004014e0
push ebx
push str..XML
lea ecx, [esp + 0xa8]
mov esi, eax
call fcn.004014e0
sub eax, esi
add eax, 4
push eax
push esi
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0xac]
call fcn.00401ee0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xac]
call fcn.00401a70
lea ecx, [esp + 0x10]
call fcn.004017d0
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x118]
push eax
push 9
lea ecx, [esp + 0xb0]
call fcn.00401800
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xac]
call fcn.00401a70
lea ecx, [esp + 0x230]
push ecx
lea ecx, [esp + 0xc0]
call fcn.00401f60
push ebx
push str.Autorun
lea ecx, [esp + 0xc4]
call fcn.004014e0
push ebx
push str..inf
lea ecx, [esp + 0xc4]
mov esi, eax
call fcn.004014e0
sub eax, esi
sub eax, 4
push eax
add esi, 8
push esi
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0xc8]
call fcn.00401ee0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xc8]
call fcn.00401a70
lea ecx, [esp + 0x10]
call fcn.004017d0
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x88]
call fcn.00401f60
push ebx
push str.Install
lea ecx, [esp + 0x8c]
call fcn.004014e0
push 0xffffffffffffffff
mov esi, eax
push str..exe
lea ecx, [esp + 0x8c]
call fcn.00401510
cmp esi, 0x104
jae 0x40282b
sub eax, esi
sub eax, 4
push eax
add esi, 8
push esi
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x90]
call fcn.00401ee0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x90]
call fcn.00401a70
lea ecx, [esp + 0x10]
call fcn.004017d0
jmp 0x402837
lea ecx, [esp + 0x84]
call fcn.00401e40
push str.Autorun.inf
lea ecx, [esp + 0x114]
call fcn.00401e10
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x11c]
call fcn.00401a70
cmp dword [esp + 0x128], ebp
mov ecx, dword [esp + 0x114]
jae 0x40286f
lea ecx, [esp + 0x114]
cmp dword [esp + 0xd4], ebp
mov eax, dword [esp + 0xc0]
jae 0x402886
lea eax, [esp + 0xc0]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x402899
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x80], ebp
mov esi, dword [esp + 0x6c]
jae 0x4028aa
lea esi, [esp + 0x6c]
mov edi, 0x40b196
mov ecx, 1
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x402945
mov eax, dword [esp + 0xb4]
mov esi, dword [esp + 0x7c]
push eax
push ebx
lea ecx, [esp + 0x54]
push ecx
lea ecx, [esp + 0xac]
call fcn.00401ee0
push eax
push 0xffffffffffffffff
push 0x40b20c
lea ecx, [esp + 0x74]
call fcn.00401510
push eax
push ebx
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x78]
call fcn.00401ee0
push eax
push esi
push 0xffffffffffffffff
push 0x40b20c
lea ecx, [esp + 0x7c]
call fcn.00401510
add eax, 1
push eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x7c]
call fcn.00401ee0
push eax
call fcn.00401400
add esp, 0xc
lea ecx, [esp + 0x10]
call fcn.004017d0
lea ecx, [esp + 0x30]
call fcn.004017d0
lea ecx, [esp + 0x4c]
call fcn.004017d0
cmp dword [esp + 0x9c], ebp
mov esi, dword [esp + 0x88]
jae 0x40295c
lea esi, [esp + 0x88]
mov edi, 0x40b196
mov ecx, 1
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4029fe
push 0x40b196
lea ecx, [esp + 0x14]
call fcn.00401f20
mov esi, dword [esp + 0x98]
lea eax, [esp + 0x10]
push eax
push 0xffffffffffffffff
push 0x40b20c
lea ecx, [esp + 0x90]
call fcn.00401510
push eax
push ebx
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x94]
call fcn.00401ee0
push eax
push esi
push 0xffffffffffffffff
push 0x40b20c
lea ecx, [esp + 0x98]
call fcn.00401510
add eax, 1
push eax
lea edx, [esp + 0x5c]
push edx
lea ecx, [esp + 0x98]
call fcn.00401ee0
push eax
call fcn.00401400
add esp, 0xc
lea ecx, [esp + 0x4c]
call fcn.004017d0
lea ecx, [esp + 0x30]
call fcn.004017d0
lea ecx, [esp + 0x10]
call fcn.004017d0
lea ecx, [esp + 0xa0]
call fcn.004017d0
lea ecx, [esp + 0x84]
call fcn.004017d0
lea ecx, [esp + 0x68]
call fcn.004017d0
lea ecx, [esp + 0xf4]
call fcn.004017d0
lea ecx, [esp + 0xd8]
call fcn.004017d0
lea ecx, [esp + 0xbc]
call fcn.004017d0
lea ecx, [esp + 0x110]
call fcn.004017d0
xor eax, eax
pop edi
mov ecx, dword [esp + 0x330]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00402c2a
add esp, 0x328
ret 0x10