Function at 0x4063e4
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x10
add esp, 0xfffff004
push eax
dec eax
jne 0x4063ed
mov eax, dword [ebp - 4]
add esp, 0xfffffdc4
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x10240], eax
mov dword [ebp - 0x1023c], eax
mov dword [ebp - 0x10238], eax
mov dword [ebp - 0x10134], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x4066e9
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
call fcn.004062ec
xor eax, eax
push ebp
push 0x4066ac
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x10134]
xor eax, eax
call fcn.00401444
mov eax, dword [ebp - 0x10134]
mov edx, 0x20
call fcn.00406378
mov edi, eax
cmp edi, 0xffffffff
jne 0x40647f
call fcn.00402290
jmp 0x4066b3
xor eax, eax
push ebp
push 0x406697
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
push 0
push edi
call sub.kernel32.dll_GetFileSize_1
sub eax, 0x118
push eax
push edi
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 8]
push eax
push 0x118
lea eax, [ebp - 0x10130]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x10130], 0xfeedbeef
jne 0x4064d2
cmp dword [ebp - 8], 0x118
je 0x4064ef
call fcn.00402290
call fcn.00402290
jmp 0x4066b3
push 0
push 0
mov eax, dword [ebp - 0x10128]
push eax
push edi
call sub.kernel32.dll_SetFilePointer_1
jmp 0x40665f
push 0
lea eax, [ebp - 8]
push eax
push 0x118
lea eax, [ebp - 0x10130]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x10130], 0xfeedbeef
je 0x40653f
call fcn.00402290
call fcn.00402290
jmp 0x4066b3
lea eax, [ebp - 0x14]
lea edx, [ebp - 0x1011f]
mov ecx, 0x105
call fcn.004028c0
call sub.kernel32.dll_GetTickCount
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x10234]
call fcn.00403368
lea edx, [ebp - 0x10234]
lea eax, [ebp - 0x18]
call fcn.004028b4
push 0x406700
push dword [ebp - 0x18]
push 0x40670c
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00402998
push 0
call sub.kernel32.dll_Sleep
lea eax, [ebp - 0x10238]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.00402924
mov eax, dword [ebp - 0x10238]
call fcn.00406344
test al, al
jne 0x406552
lea eax, [ebp - 0x1023c]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.00402924
mov eax, dword [ebp - 0x1023c]
call fcn.004063b8
mov dword [ebp - 4], eax
mov ebx, dword [ebp - 0x10128]
cmp ebx, 0x10000
jbe 0x4065e9
mov esi, 0x10000
jmp 0x4065eb
mov esi, ebx
push 0
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x10018]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x10018]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_WriteFile_1
sub ebx, dword [ebp - 8]
cmp esi, dword [ebp - 8]
jne 0x406625
test ebx, ebx
jne 0x4065da
mov eax, dword [ebp - 4]
call fcn.004063dc
test ebx, ebx
jne 0x406651
lea eax, [ebp - 0x10240]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.00402924
mov eax, dword [ebp - 0x10240]
call fcn.00406250
test al, al
jne 0x40665f
mov eax, edi
call fcn.004063dc
xor eax, eax
call fcn.004025c8
push 1
push 0
push 0
push edi
call sub.kernel32.dll_SetFilePointer_1
mov ebx, eax
push 0
push edi
call sub.kernel32.dll_GetFileSize_1
sub eax, 0x118
cmp ebx, eax
jbe 0x406505
mov eax, edi
call fcn.004063dc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40669e
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4066f0
lea eax, [ebp - 0x10240]
mov edx, 3
call fcn.00402680
lea eax, [ebp - 0x10134]
call fcn.0040265c
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00402680
ret