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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x47e4c8]
push esi
xor esi, esi
mov dword [ebp - 0x1c], eax
cmp eax, esi
mov dword [ebp - 0xc], esi
jle 0x41320c
push ebx
push edi
mov dword [ebp - 0x18], 0x64
mov edi, 0x42bc40
push dword [ebp - 0xc]
mov ecx, 0x47e4bc
call fcn.0041e860
mov ebx, eax
mov dword [ebp - 0x10], ebx
push dword [ebx + 0x28]
call fcn.00412ba7
test al, al
pop ecx
je 0x4131f4
lea eax, [ebx + 4]
mov ecx, 0x47dfb8
push eax
mov dword [ebp - 8], eax
call fcn.004164b1
add ebx, 0x10
mov ecx, 0x47dfb8
push ebx
call fcn.004164b1
mov eax, dword [ebp - 0x10]
mov ecx, 0x47dfb8
add eax, 0x1c
push eax
mov dword [ebp - 4], eax
call fcn.004164b1
mov ecx, dword [ebp - 8]
push 1
push esi
push 0x42bc5c
call fcn.0041c7db
mov ecx, dword [ebp - 8]
push eax
push esi
call fcn.0041cc95
push eax
lea ecx, [ebp - 0x3c]
call fcn.0041be99
push 1
lea ecx, [ebp - 0x3c]
call fcn.0041cd1e
push eax
call fcn.0040dc10
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
call fcn.0041cd1e
push eax
call fcn.0040df52
test al, al
pop ecx
jne 0x412f5e
mov ecx, dword [ebp - 8]
call fcn.0041cd1e
push 0x47e794
push eax
mov ecx, 0x47e788
call fcn.00421ce6
mov ecx, dword [ebp - 8]
push esi
push 0x80
push 4
push esi
push 1
push 0x40000000
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
cmp dword [eax], 1
jne 0x412ff1
mov ecx, dword [ebp - 8]
push esi
push 0x80
push 4
push esi
push 1
push 0xc0000000
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4131ec
lea eax, [ebp - 0x20]
push 2
push eax
push esi
push ebx
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 4]
lea ecx, [ebp - 0x48]
call fcn.0041be99
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jbe 0x412fc7
push esi
push esi
push edi
lea ecx, [ebp - 0x48]
call fcn.0041ca20
lea eax, [ebp - 0x24]
push esi
push eax
lea ecx, [ebp - 0x48]
push dword [ebp - 0x48]
mov dword [ebp - 0x24], esi
call fcn.0041cd1e
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x48]
jmp 0x4131cf
lea ecx, [ebp - 0x30]
call fcn.0041bdc5
mov ecx, dword [ebp - 8]
push esi
push esi
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041cac5
test eax, eax
jl 0x413104
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
cmp eax, esi
jne 0x41303f
mov ecx, dword [ebp - 4]
push esi
push edi
call fcn.0041c047
push esi
push esi
mov ecx, dword [ebp - 4]
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041ca20
jmp 0x4131bb
cmp eax, 2
jne 0x413074
push esi
push edi
mov ecx, ebx
call fcn.0041c047
push esi
push esi
mov ecx, ebx
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041c6d0
cmp eax, 0xffffffff
je 0x413104
mov ebx, dword [ebx]
push esi
lea eax, [ebx + eax - 2]
jmp 0x413112
cmp eax, 3
jne 0x41309b
push esi
push edi
mov ecx, ebx
call fcn.0041c047
push esi
push 1
push esi
mov ecx, ebx
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041c416
jmp 0x4131bb
cmp eax, 4
jne 0x4130d5
push esi
push edi
mov ecx, ebx
call fcn.0041c047
mov ecx, dword [ebp - 4]
push esi
push edi
call fcn.0041c047
push esi
push esi
mov ecx, ebx
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041c6d0
cmp eax, 0xffffffff
je 0x413104
mov ebx, dword [ebx]
push esi
add ebx, eax
push ebx
jmp 0x413029
cmp eax, 5
jne 0x413118
push esi
push edi
mov ecx, ebx
call fcn.0041c047
mov ecx, dword [ebp - 4]
push esi
push edi
call fcn.0041c047
push esi
push esi
mov ecx, ebx
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041c6d0
cmp eax, 0xffffffff
jne 0x413111
lea ecx, [ebp - 0x30]
call fcn.0041befb
jmp 0x4131ec
push esi
push eax
jmp 0x413029
cmp eax, 6
jne 0x413199
lea ecx, [ebp - 0x60]
call fcn.0041bdc5
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x14], esi
call fcn.0041bdc5
push dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
call fcn.0041c9d2
test al, al
je 0x41317b
lea eax, [ebp - 0x60]
lea ecx, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041c92f
mov ecx, ebx
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x60]
call fcn.0041cc5d
test al, al
jne 0x413130
lea eax, [ebp - 0x60]
lea ecx, [ebp - 0x54]
push eax
call fcn.0041c0c5
push esi
push edi
lea ecx, [ebp - 0x54]
call fcn.0041c047
jmp 0x413130
lea eax, [ebp - 0x54]
lea ecx, [ebp - 0x30]
push eax
call fcn.0041bf80
lea ecx, [ebp - 0x54]
call fcn.0041befb
lea ecx, [ebp - 0x60]
call fcn.0041befb
jmp 0x4131bb
cmp eax, 7
jne 0x4131bb
mov ecx, dword [ebp - 4]
push 1
push esi
push esi
call fcn.0041cd1e
push eax
mov ecx, ebx
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041cbf9
mov ecx, dword [ebp - 8]
call fcn.0041cd1e
push eax
lea ecx, [ebp - 0x30]
call fcn.0041ce0e
lea ecx, [ebp - 0x30]
call fcn.0041befb
cmp dword [ebp - 0x1c], esi
jle 0x4131ec
mov eax, dword [ebp - 0x18]
push esi
cdq
idiv dword [ebp - 0x1c]
mov ecx, 0x47e880
push eax
call fcn.00414c1b
lea ecx, [ebp - 0x3c]
call fcn.0041befb
inc dword [ebp - 0xc]
add dword [ebp - 0x18], 0x64
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x47e4c8]
jl 0x412e82
pop edi
pop ebx
mov al, 1
pop esi
leave
ret