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

Disassembly:
push 0xffffffffffffffff
push 0x414feb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1f8
push ebx
push ebp
push esi
push edi
mov edi, dword [0x41b390]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edi
mov dword [0x41b390], 0x41827c
mov ebx, dword [esp + 0x21c]
xor ebp, ebp
push ebx
mov dword [esp + 0x214], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
call fcn.0040c6d0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x218]
add eax, ebx
push ecx
push str._s.unz
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push ebp
push 0x80
push 4
push ebp
push 1
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4032a1
push ebx
push 0x1007
call fcn.0040c000
add esp, 8
mov dword [0x41b390], edi
xor eax, eax
jmp 0x40352b
mov ecx, 0x62
xor eax, eax
lea edi, [esp + 0x7c]
push ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, eax
test ebp, ebp
jbe 0x40333a
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push 8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40333a
cmp dword [esp + 0x18], 0x5a4e55
jne 0x40333a
cmp word [esp + 0x1e], 0x101
ja 0x40333a
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x38]
push 0x4a
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40333a
mov eax, dword [esp + 0x70]
inc word [esp + 0x74]
push 0
push 0
push ebp
push esi
mov dword [esp + 0x8e], eax
mov dword [esp + 0x80], ebp
mov dword [esp + 0x30], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4033c2
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x20]
push 8
push edx
push esi
mov dword [esp + 0x2c], 0x5a4e55
mov word [esp + 0x30], 0x101
mov word [esp + 0x32], 0xffff
call edi
test eax, eax
je 0x403506
mov eax, dword [esp + 0x218]
push 0x3f
lea ecx, [esp + 0x34]
push eax
push ecx
call fcn.0040dba0
add esp, 0xc
xor ebp, ebp
lea edx, [esp + 0x10]
lea eax, [esp + 0x30]
push ebp
push edx
push 0x4a
push eax
push esi
mov byte [esp + 0x83], 0
mov dword [esp + 0x84], 0x52
mov word [esp + 0x88], 1
mov dword [esp + 0x8a], ebp
call edi
test eax, eax
je 0x403506
mov dword [esp + 0x7e], ebp
mov ecx, dword [0x41b38c]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpynA]
add ecx, 0x1b0
push 0x80
lea edx, [esp + 0x86]
push ecx
push edx
mov word [esp + 0x88], 0x101
call ebp
mov eax, dword [0x41b38c]
push 0x104
add eax, 0x444
lea ecx, [esp + 0x106]
push eax
push ecx
call ebp
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x84]
push 0x18b
push eax
push esi
call edi
test eax, eax
je 0x403506
mov ebp, dword [esp + 0x28]
mov eax, dword [ebp + 4]
test eax, eax
jne 0x403438
mov dword [esp + 0x14], eax
jmp 0x403444
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 2
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x1c]
push 4
push eax
push esi
call edi
test eax, eax
je 0x403506
mov edx, dword [esp + 0x14]
mov eax, dword [ebp + 4]
lea ecx, [esp + 0x10]
push 0
push ecx
lea ecx, [edx*4]
push ecx
push eax
push esi
call edi
test eax, eax
je 0x403506
mov edx, dword [ebp + 0x18]
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
mov dword [esp + 0x28], edx
call edi
test eax, eax
je 0x403506
mov eax, dword [esp + 0x14]
mov ebp, dword [ebp + 0x10]
lea edx, [esp + 0x10]
push 0
push edx
push eax
push ebp
push esi
call edi
test eax, eax
je 0x403506
push 0
push 0
push 0
push esi
mov dword [esp + 0x28], 0x5a4e55
mov word [esp + 0x2c], 0x101
mov word [esp + 0x2e], 0x100
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x20]
push 8
push edx
push esi
call edi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4034ff
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x38]
push 0x4a
push ecx
push esi
call edi
mov edi, 1
jmp 0x403518
push ebx
push 0x1006
call fcn.0040c000
mov edi, dword [esp + 0x2c]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x2c]
mov eax, edi
mov dword [0x41b390], edx
mov ecx, dword [esp + 0x208]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x204
ret 8