Function at 0x405ba0
Capabilities:
Copy file

Disassembly:
push ebp
lea ebp, [esp - 0x1c0]
sub esp, 0x240
mov eax, dword [0x42005c]
push ebx
push esi
push edi
push 0
mov dword [ebp + 0x1bc], eax
push 5
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0x1c8]
mov esi, ecx
push eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x58], 1
call fcn.004148bf
push dword [ebp - 0x6c]
mov ecx, dword [esi + 0x10]
call fcn.004067ed
mov ebx, eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x50], eax
mov cl, 0x5c
jmp 0x405c00
test al, al
je 0x405c11
inc dword [ebp - 0x50]
mov eax, dword [ebp - 0x50]
mov al, byte [eax]
cmp al, cl
jne 0x405bf6
mov eax, dword [ebp - 0x50]
cmp byte [eax], 0
je 0x405c11
inc dword [ebp - 0x50]
mov eax, dword [ebp - 0x68]
mov esi, eax
mov al, byte [eax]
jmp 0x405c21
test al, al
je 0x405c2b
inc esi
mov al, byte [esi]
cmp al, cl
jne 0x405c1a
cmp byte [esi], 0
je 0x405c2b
inc esi
add ebx, 0x18
lea edx, [ebp - 0x4c]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405c35
lea eax, [ebp - 0x4c]
push eax
call fcn.00403f61
mov eax, esi
mov edx, esi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405c4c
lea edi, [ebp - 0x4c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405c59
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp + 0xb8]
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
sub eax, ebx
mov dl, byte [ecx]
mov byte [eax + ecx], dl
inc ecx
test dl, dl
jne 0x405c7b
lea eax, [ebp + 0xb8]
push eax
call fcn.00403f61
mov eax, dword [ebp - 0x50]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405c96
lea edi, [ebp + 0xb8]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405ca6
push dword [ebp - 0x60]
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]
mov ecx, dword [0x420b04]
call fcn.00407eff
mov ebx, dword [ebp - 0x70]
mov edi, dword [ebp - 0x54]
mov esi, eax
or esi, dword [ebx + 0xc]
test esi, 0x900000
jne 0x405cf8
mov ecx, dword [edi + 0x18]
push 0
push dword [ebp - 0x5c]
lea eax, [ebp + 0xb8]
push eax
push 0x401cd0
call fcn.00406e94
mov dword [ebp - 0x50], esi
and dword [ebp - 0x50], 0x800000
lea eax, [ebp + 0xb8]
jne 0x405d20
push dword [ebp - 0x5c]
mov ecx, edi
push dword [ebp - 0x60]
push eax
push dword [ebp - 0x6c]
push ebx
call fcn.00405627
xor esi, esi
jmp 0x405d42
push eax
lea eax, [edi + 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 0x5c]
xor esi, esi
push dword [ebp - 0x60]
mov ecx, edi
push esi
push dword [ebp - 0x64]
push ebx
call fcn.004058bd
cmp eax, 0xffffffff
je 0x405f28
cmp eax, esi
jne 0x405d57
xor eax, eax
inc eax
jmp 0x405ee8
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x80]
call fcn.00414ef1
cmp dword [ebp - 0x50], esi
jne 0x405dd6
lea eax, [ebp + 0xb8]
push eax
call fcn.00404548
push esi
lea eax, [ebp + 0xb8]
push eax
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x405d99
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x3f6
jmp 0x405f18
push esi
push esi
push 3
push esi
push 3
push 0xc0000000
lea eax, [ebp + 0xb8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405ee5
lea eax, [ebp - 0x78]
push eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405ee5
push 0x800
call fcn.0040bf2e
mov edi, eax
cmp edi, esi
pop ecx
je 0x405f28
mov esi, 0x400
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp + 0xb8]
push eax
push dword [ebp - 0x74]
push dword [ebp - 0x78]
push 0x401c88
push 0x3ff
push edi
call fcn.0040bf33
add esp, 0x1c
test eax, eax
jl 0x405f13
lea eax, [ebp - 0x54]
push eax
call fcn.004166db
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x50], eax
jl 0x405e4d
push ebx
push ebx
push edi
push dword [ebp - 0x54]
call fcn.0040847a
push dword [ebp - 0x54]
mov dword [ebp - 0x50], eax
call fcn.00416530
cmp dword [ebp - 0x50], ebx
jge 0x405f00
mov ecx, dword [0x420b04]
mov eax, dword [ecx]
call dword [eax + 0x3c]
test eax, eax
jne 0x405f00
push eax
push esi
lea ebx, [edi + 0x401]
push ebx
push esi
push dword [ebp - 0x50]
push eax
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x405e8f
push dword [ebp - 0x50]
push 0x401ba4
push esi
push ebx
call fcn.0040bf33
add esp, 0x10
push esi
push edi
push 0x2cb
push dword [0x420afc]
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [edi + 0x400]
push eax
push edi
mov byte [eax], 0xa
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [0x420b04]
mov ecx, dword [eax + 0x1264]
mov eax, dword [eax + 0x22c]
push 6
push ecx
push edi
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 0xa
mov dword [ebp - 0x58], eax
je 0x405f07
mov dword [ebp - 0x58], 1
push edi
call fcn.0040bf29
pop ecx
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp + 0x1bc]
pop edi
pop esi
pop ebx
call fcn.0040bf1b
add ebp, 0x1c0
leave
ret 4
mov dword [ebp - 0x58], 1
cmp dword [ebp - 0x50], 0
jl 0x405df0
jmp 0x405ede
push 0x3f7
mov ecx, dword [0x420b04]
push 0x321
call fcn.00407f9f
xor eax, eax
jmp 0x405ee8