Function at 0x650550
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x1a2
push 0
push 0
dec ecx
jne 0x650558
push esi
push edi
mov esi, eax
lea edi, [ebp - 0x69]
xor ecx, ecx
mov cl, byte [esi]
cmp cl, 0x50
jb 0x650571
mov cl, 0x50
mov byte [edi], cl
inc esi
inc edi
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 4], edx
lea eax, [ebp - 0xc]
mov edx, dword [0x4717d0]
call fcn.00405fcc
xor eax, eax
push ebp
push 0x6509ca
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00402ee4
mov eax, dword [0x65c454]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
mov edx, dword [0x65ca74]
mov edx, dword [edx]
call fcn.00405650
lea ecx, [ebp - 0xce0]
lea edx, [ebp - 0x10]
lea eax, [ebp - 0x69]
call fcn.0064fbb8
cmp dword [ebp - 0x10], 0xffffffff
jne 0x6505e6
mov eax, dword [0x65c6d4]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
mov edx, dword [0x65c188]
mov edx, dword [edx]
call fcn.00405650
mov eax, dword [0x65c454]
mov eax, dword [eax]
cmp eax, dword [ebp - 0xc]
jne 0x650685
mov ecx, dword [0x65c788]
mov ecx, dword [ecx]
lea eax, [ebp - 0xce4]
mov edx, dword [0x661dbc]
call fcn.004058e0
mov edx, dword [ebp - 0xce4]
lea eax, [ebp - 0x1b8]
call fcn.00403554
mov ecx, dword [0x65c61c]
mov ecx, dword [ecx]
lea eax, [ebp - 0xce8]
mov edx, dword [0x661dbc]
call fcn.004058e0
mov edx, dword [ebp - 0xce8]
lea eax, [ebp - 0x450]
call fcn.00403554
mov edx, 0x538
lea eax, [ebp - 0x450]
call fcn.00403b44
mov eax, dword [0x65c90c]
mov byte [eax], 2
call fcn.00402ee4
test eax, eax
je 0x650685
mov eax, dword [0x65c7a8]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
mov edx, dword [0x65c244]
mov edx, dword [edx]
call fcn.00405650
mov eax, dword [0x65c454]
mov eax, dword [eax]
cmp eax, dword [ebp - 0xc]
jne 0x650736
lea eax, [ebp - 0xcec]
mov ecx, 0x6509e0
mov edx, dword [0x661dbc]
call fcn.004058e0
mov edx, dword [ebp - 0xcec]
lea eax, [ebp - 0x304]
call fcn.00403554
lea eax, [ebp - 0xcf0]
mov ecx, 0x6509f4
mov edx, dword [0x661dbc]
call fcn.004058e0
mov edx, dword [ebp - 0xcf0]
lea eax, [ebp - 0x59c]
call fcn.00403554
mov edx, 0x51
lea eax, [ebp - 0x304]
call fcn.00403b60
mov eax, dword [0x65c90c]
mov byte [eax], 2
mov edx, 0x538
lea eax, [ebp - 0x59c]
call fcn.00403b60
mov eax, dword [0x65c90c]
mov byte [eax], 2
call fcn.00402ee4
test eax, eax
je 0x650736
mov eax, dword [0x65c5e0]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
mov edx, dword [0x65c08c]
mov edx, dword [edx]
call fcn.00405650
mov eax, dword [0x65c454]
mov eax, dword [eax]
cmp eax, dword [ebp - 0xc]
jne 0x65082b
jmp 0x6507d4
lea edx, [ebp - 0xad8]
lea eax, [ebp - 0x450]
call fcn.004039f0
lea eax, [ebp - 0xcf8]
lea edx, [ebp - 0xa57]
call fcn.0040581c
mov eax, dword [ebp - 0xcf8]
lea edx, [ebp - 0xcf4]
call fcn.00409ec4
mov eax, dword [ebp - 0xcf4]
push eax
lea eax, [ebp - 0xd00]
lea edx, [ebp - 0x69]
call fcn.0040581c
mov eax, dword [ebp - 0xd00]
lea edx, [ebp - 0xcfc]
call fcn.00409ec4
mov edx, dword [ebp - 0xcfc]
pop eax
call fcn.004059e0
je 0x6507d4
lea edx, [ebp - 0xa57]
lea eax, [ebp - 0x304]
call fcn.00403d0c
lea edx, [ebp - 0xad8]
lea eax, [ebp - 0x59c]
call fcn.00403d0c
lea eax, [ebp - 0x450]
call fcn.0040389c
test al, al
je 0x65074b
lea eax, [ebp - 0x450]
call fcn.004036f8
lea eax, [ebp - 0x304]
call fcn.004036f8
lea eax, [ebp - 0x59c]
call fcn.004036f8
call fcn.00402ee4
test eax, eax
je 0x65082b
mov eax, dword [0x65c204]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
mov edx, dword [0x65c828]
mov edx, dword [edx]
call fcn.00405650
mov eax, dword [0x65c454]
mov eax, dword [eax]
cmp eax, dword [ebp - 0xc]
jne 0x65097c
push dword [0x661dbc]
mov eax, dword [0x65c788]
push dword [eax]
push 0x650a08
lea eax, [ebp - 0xd04]
mov edx, 3
call fcn.00405954
mov edx, dword [ebp - 0xd04]
lea eax, [ebp - 0xbd8]
mov ecx, 0xff
call fcn.00405870
push dword [0x661dbc]
push 0x6509e0
push 0x650a08
lea eax, [ebp - 0xd08]
mov edx, 3
call fcn.00405954
mov edx, dword [ebp - 0xd08]
lea eax, [ebp - 0xcd8]
mov ecx, 0xff
call fcn.00405870
lea eax, [ebp - 0xbd7]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xcd7]
mov dword [ebp - 0x18], eax
push 0
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CopyFileA
push dword [0x661dbc]
mov eax, dword [0x65c61c]
push dword [eax]
push 0x650a08
lea eax, [ebp - 0xd0c]
mov edx, 3
call fcn.00405954
mov edx, dword [ebp - 0xd0c]
lea eax, [ebp - 0xbd8]
mov ecx, 0xff
call fcn.00405870
push dword [0x661dbc]
push 0x6509f4
push 0x650a08
lea eax, [ebp - 0xd10]
mov edx, 3
call fcn.00405954
mov edx, dword [ebp - 0xd10]
lea eax, [ebp - 0xcd8]
mov ecx, 0xff
call fcn.00405870
lea eax, [ebp - 0xbd7]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xcd7]
mov dword [ebp - 0x18], eax
push 0
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CopyFileA
call fcn.00402ee4
test eax, eax
je 0x65097c
mov eax, dword [0x65c79c]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
mov edx, dword [0x65c230]
mov edx, dword [edx]
call fcn.00405650
mov eax, dword [ebp - 4]
lea edx, [ebp - 0xc]
mov ecx, dword [0x4717d0]
call fcn.00406300
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x6509d1
lea eax, [ebp - 0xd10]
mov edx, 0xc
call fcn.004055dc
lea eax, [ebp - 0xce0]
mov edx, dword [0x4717d0]
call fcn.0040609c
lea eax, [ebp - 0xc]
mov edx, dword [0x4717d0]
call fcn.0040609c
ret