Function at 0x4084f0
Capabilities:
Copy file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53163a
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x5bc684]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
movzx eax, word [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x21c], eax
xor eax, eax
cmp esi, eax
je 0x40899b
mov ebx, dword [ebp + 0xc]
cmp ebx, eax
je 0x40899b
push 0x1ffff
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], eax
call fcn.004fc6be
add esp, 4
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
mov edi, eax
push esi
mov dword [ebp - 0x228], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40891c
push 0
lea ecx, [ebp - 0x224]
push ecx
push 0x1fffe
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x40891c
cmp dword [ebp - 0x224], 0
je 0x40891c
push 0x103
lea edx, [ebp - 0x217]
push 0
push edx
mov byte [ebp - 0x218], 0
call fcn.004ff6f0
lea edx, [ebp - 0x218]
add esp, 0xc
mov eax, ebx
sub edx, ebx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4085e0
push 0x103
lea eax, [ebp - 0x113]
push 0
push eax
mov byte [ebp - 0x114], cl
call fcn.004ff6f0
add esp, 0xc
cmp dword [0x5c19bc], 0
je 0x408651
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x408635
cmp byte [eax], 0
je 0x408635
lea edx, [ebp - 0x114]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408623
or ebx, 0xffffffff
jmp 0x4086dc
push 0x103
lea ecx, [ebp - 0x114]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
or ebx, 0xffffffff
jmp 0x4086dc
lea edx, [ebp - 0x114]
mov eax, ebx
sub edx, ebx
jmp 0x408660
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408660
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408673
sub eax, edx
dec eax
cmp eax, 1
jle 0x4086a3
mov cl, byte [ebp + eax - 0x114]
cmp cl, 0x5c
je 0x40869b
cmp cl, 0x2f
je 0x40869b
dec eax
cmp eax, 1
jg 0x408682
jmp 0x4086a3
mov byte [ebp + eax - 0x113], 0
mov eax, dword [str.eb702setup_stub.bin]
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086b0
lea edi, [ebp - 0x114]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4086c4
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [ebp - 0x218]
push 0x3e8
push ecx
call fcn.004cbce0
mov esi, eax
add esp, 8
test esi, esi
je 0x4088c6
push esi
call fcn.004cbc70
mov edi, eax
add esp, 4
test edi, edi
je 0x408735
push esi
call fcn.004cb750
lea edx, [ebp - 0x218]
push esi
push edx
call fcn.004cbf90
add esp, 0xc
push esi
call fcn.004fedfc
add esp, 4
push 0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov esi, eax
test esi, esi
je 0x4087fb
mov ecx, dword [ebp - 0x224]
mov edx, dword [ebp - 0x228]
movzx eax, word [ebp - 0x21c]
push ecx
push edx
push 0
push eax
push str.RT_RCDATA
push esi
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
push 0
test eax, eax
je 0x4087cc
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
test eax, eax
je 0x40879b
mov dword [ebp - 0x220], 1
jmp 0x408838
push 0
push 0xdf0d
lea ecx, [ebp - 0x21c]
call fcn.00406200
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
push 1
push 0x3e8
push eax
call fcn.00407720
add esp, 0xc
jmp 0x40882a
push 0xdf0e
lea ecx, [ebp - 0x21c]
call fcn.00406200
mov dword [ebp - 4], 2
mov ecx, dword [ebp - 0x21c]
push 1
push 0x3e8
push ecx
call fcn.00407720
add esp, 0xc
jmp 0x40882a
push 0
push 0xdf0f
lea ecx, [ebp - 0x21c]
call fcn.00406200
mov dword [ebp - 4], 4
mov edx, dword [ebp - 0x21c]
push 1
push 0x3e8
push edx
call fcn.00407720
add esp, 0xc
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x21c]
call fcn.004bfa40
test edi, edi
je 0x408980
lea eax, [ebp - 0x218]
push 0x3e8
push eax
mov dword [ebp - 0x220], 0
call fcn.004cbce0
mov esi, eax
add esp, 8
test esi, esi
je 0x40888f
push esi
call fcn.004cb8d0
lea ecx, [ebp - 0x218]
push esi
push ecx
call fcn.004cbf90
push esi
call fcn.004fedfc
add esp, 0x10
mov dword [ebp - 0x220], 1
jmp 0x408980
push 0
push 0xdf0f
lea ecx, [ebp - 0x21c]
call fcn.00406200
mov dword [ebp - 4], 6
mov edx, dword [ebp - 0x21c]
push 1
push 0x3e8
push edx
call fcn.00407720
add esp, 0xc
mov dword [ebp - 4], ebx
jmp 0x408975
mov eax, dword [0x5bbfe4]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 4], 8
push 0x54f15a
lea ecx, [ebp - 0x21c]
call fcn.004bfc00
push 0
push 0xdf0f
lea ecx, [ebp - 0x21c]
call fcn.004c1150
mov dword [ebp - 4], 9
mov ecx, dword [ebp - 0x21c]
push 1
push 0x3e8
push ecx
call fcn.00407720
add esp, 0xc
mov dword [ebp - 4], ebx
jmp 0x408975
mov edx, dword [0x5bbfe4]
mov dword [ebp - 0x21c], edx
mov dword [ebp - 4], 0xb
push 0x54f15a
lea ecx, [ebp - 0x21c]
call fcn.004bfc00
push 0
push 0xdf10
lea ecx, [ebp - 0x21c]
call fcn.004c1150
mov dword [ebp - 4], 0xc
mov eax, dword [ebp - 0x21c]
push 1
push 0x3e8
push eax
call fcn.00407720
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004bfa40
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x408993
push eax
call fcn.004808a0
add esp, 4
mov eax, dword [ebp - 0x220]
jmp 0x40899d
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004fe1f5
mov esp, ebp
pop ebp
ret