Function at 0x405c8c
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403a94
xor eax, eax
push ebp
push 0x40600a
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 4]
call fcn.00403aa4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x405d29
push 0
push 0x40601c
push 0x406028
push dword [ebp - 4]
push 0x406040
lea edx, [ebp - 0x44]
xor eax, eax
call fcn.00406434
push dword [ebp - 0x44]
lea eax, [ebp - 0x40]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0x40]
call fcn.00403aa4
push eax
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x405fd9
mov eax, 0x7ffffffe
call fcn.00402bf8
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
call fcn.004027b4
add eax, 0x200800
adc edx, 0
jno 0x405d4d
call fcn.00402f1c
push edx
push eax
mov eax, 0x38b14001
call fcn.00402bf8
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
call fcn.004027b4
add eax, dword [esp]
adc edx, dword [esp + 4]
jno 0x405d72
call fcn.00402f1c
add esp, 8
test edx, edx
je 0x405d7e
call fcn.00402f14
mov dword [ebp - 0x1c], eax
mov eax, 0x47a7c
call fcn.00402bf8
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
call fcn.004027b4
add eax, 0x1bf53d2
adc edx, 0
jno 0x405da5
call fcn.00402f1c
test edx, edx
je 0x405dae
call fcn.00402f14
mov dword [ebp - 0x18], eax
mov eax, 0x7ffffffe
call fcn.00402bf8
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
call fcn.004027b4
add eax, 0x200800
adc edx, 0
jno 0x405dd5
call fcn.00402f1c
push edx
push eax
mov eax, 0x38b14001
call fcn.00402bf8
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
call fcn.004027b4
add eax, dword [esp]
adc edx, dword [esp + 4]
jno 0x405dfa
call fcn.00402f1c
add esp, 8
test edx, edx
je 0x405e06
call fcn.00402f14
mov dword [ebp - 0x24], eax
mov eax, 0x47a7c
call fcn.00402bf8
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
call fcn.004027b4
add eax, 0x1bf53d2
adc edx, 0
jno 0x405e2d
call fcn.00402f1c
test edx, edx
je 0x405e36
call fcn.00402f14
mov dword [ebp - 0x20], eax
mov eax, 0x7ffffffe
call fcn.00402bf8
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
call fcn.004027b4
add eax, 0x200800
adc edx, 0
jno 0x405e5d
call fcn.00402f1c
push edx
push eax
mov eax, 0x38b14001
call fcn.00402bf8
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
call fcn.004027b4
add eax, dword [esp]
adc edx, dword [esp + 4]
jno 0x405e82
call fcn.00402f1c
add esp, 8
test edx, edx
je 0x405e8e
call fcn.00402f14
mov dword [ebp - 0x2c], eax
mov eax, 0x47a7c
call fcn.00402bf8
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
call fcn.004027b4
add eax, 0x1bf53d2
adc edx, 0
jno 0x405eb5
call fcn.00402f1c
test edx, edx
je 0x405ebe
call fcn.00402f14
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_SetFileTime
mov eax, dword [ebp - 8]
call fcn.00402bf8
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
call fcn.004027b4
test edx, edx
je 0x405ef2
call fcn.00402f14
mov dword [ebp - 8], eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_GetFileSize_1
cmp dword [ebp - 8], 0
jbe 0x405fd0
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0xc]
jae 0x405fd0
mov eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x30]
mov ecx, 1
mov edx, dword [0x405c6c]
call fcn.00404218
add esp, 4
mov eax, dword [ebp - 8]
sub eax, 1
jae 0x405f3f
call fcn.00402f1c
test eax, eax
jns 0x405f48
call fcn.00402f14
test eax, eax
jl 0x405f8c
inc eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], 0
mov eax, pe_nt_image_headers32
call fcn.00402bf8
cmp eax, 0xff
jbe 0x405f6d
call fcn.00402f14
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x405f7c
cmp edx, dword [ecx - 4]
jb 0x405f81
call fcn.00402f14
mov byte [ecx + edx], al
inc dword [ebp - 0x34]
dec dword [ebp - 0x3c]
jne 0x405f57
push 2
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
xor eax, eax
mov edx, dword [ebp - 0x30]
test edx, edx
je 0x405fb3
cmp eax, dword [edx - 4]
jb 0x405fb8
call fcn.00402f14
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
jne 0x405fd0
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
invalid