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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x47a3b0]
push edi
xor edi, edi
mov dword [ebp - 0x1c], ecx
cmp eax, edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], edi
jle 0x412737
push ebx
push esi
mov dword [ebp - 0x14], 0x64
mov ebx, 0x427c50
push dword [ebp - 0xc]
mov ecx, 0x47a3a4
call fcn.0041c45e
mov ecx, dword [ebp - 0x1c]
mov esi, eax
push dword [esi + 0x28]
call fcn.004121cd
test al, al
je 0x41271f
push 1
lea ecx, [esi + 4]
push edi
push 0x427c6c
mov dword [ebp - 4], ecx
call fcn.0041a683
mov ecx, dword [ebp - 4]
push eax
push edi
call fcn.0041ab15
push eax
lea ecx, [ebp - 0x38]
call fcn.00419d38
push 1
lea ecx, [ebp - 0x38]
call fcn.0041ab9e
push eax
call fcn.0040d674
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
call fcn.0041ab9e
push eax
call fcn.0040d9bb
test al, al
pop ecx
jne 0x412462
mov ecx, dword [ebp - 4]
call fcn.0041ab9e
push 0x47a66c
push eax
mov ecx, 0x47a660
call fcn.0041f0bc
mov ecx, dword [ebp - 4]
push edi
push 0x80
push 4
push edi
push 1
push 0x40000000
call fcn.0041ab9e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi], 1
jne 0x4124f1
mov ecx, dword [ebp - 4]
push edi
push 0x80
push 4
push edi
push 1
push 0x40000000
call fcn.0041ab9e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x412717
push 2
push edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esi, 0x1c
lea ecx, [ebp - 0x44]
push esi
call fcn.00419d38
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jbe 0x4124c6
push edi
push edi
push ebx
lea ecx, [ebp - 0x44]
call fcn.0041a8c8
lea eax, [ebp - 0x20]
push edi
push eax
lea ecx, [ebp - 0x44]
push dword [ebp - 0x44]
call fcn.0041ab9e
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x44]
jmp 0x4126fa
lea ecx, [ebp - 0x2c]
call fcn.00419c64
mov ecx, dword [ebp - 4]
push edi
push edi
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041a96d
test eax, eax
jl 0x41261a
mov eax, dword [esi]
cmp eax, edi
jne 0x41253d
add esi, 0x1c
push edi
push ebx
mov ecx, esi
call fcn.00419ee6
push edi
push edi
mov ecx, esi
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041a8c8
jmp 0x4126e6
cmp eax, 2
jne 0x412576
push edi
lea ecx, [esi + 0x10]
push ebx
call fcn.00419ee6
push edi
push edi
lea ecx, [esi + 0x10]
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041a578
cmp eax, 0xffffffff
je 0x41261a
mov ecx, dword [esi + 0x10]
push edi
lea eax, [ecx + eax - 2]
lea ecx, [esi + 0x1c]
push eax
jmp 0x41252a
cmp eax, 3
jne 0x4125a0
add esi, 0x10
push edi
push ebx
mov ecx, esi
call fcn.00419ee6
push edi
push 1
push edi
mov ecx, esi
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041a2b5
jmp 0x4126e6
cmp eax, 4
jne 0x4125e4
lea ecx, [esi + 0x10]
push edi
push ebx
mov dword [ebp - 8], ecx
call fcn.00419ee6
add esi, 0x1c
push edi
push ebx
mov ecx, esi
call fcn.00419ee6
mov ecx, dword [ebp - 8]
push edi
push edi
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041a578
cmp eax, 0xffffffff
je 0x41261a
mov ecx, dword [ebp - 8]
push edi
mov ecx, dword [ecx]
add ecx, eax
push ecx
jmp 0x412528
cmp eax, 5
jne 0x41262e
lea ecx, [esi + 0x10]
push edi
push ebx
mov dword [ebp - 8], ecx
call fcn.00419ee6
add esi, 0x1c
push edi
push ebx
mov ecx, esi
call fcn.00419ee6
mov ecx, dword [ebp - 8]
push edi
push edi
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041a578
cmp eax, 0xffffffff
jne 0x412627
lea ecx, [ebp - 0x2c]
call fcn.00419d9a
jmp 0x412717
push edi
push eax
jmp 0x412528
cmp eax, 6
jne 0x4126c3
lea ecx, [ebp - 0x5c]
call fcn.00419c64
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x10], edi
call fcn.00419c64
push dword [ebp - 0x10]
lea ecx, [ebp - 0x2c]
call fcn.0041a87a
test al, al
je 0x4126a5
add esi, 0x10
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0041a7d7
mov ecx, esi
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x5c]
call fcn.0041aadd
test al, al
jne 0x412696
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x50]
push eax
call fcn.00419f64
push edi
push ebx
lea ecx, [ebp - 0x50]
call fcn.00419ee6
push dword [ebp - 0x10]
lea ecx, [ebp - 0x2c]
call fcn.0041a87a
test al, al
jne 0x41265c
lea eax, [ebp - 0x50]
lea ecx, [ebp - 0x2c]
push eax
call fcn.00419e1f
lea ecx, [ebp - 0x50]
call fcn.00419d9a
lea ecx, [ebp - 0x5c]
call fcn.00419d9a
jmp 0x4126e6
cmp eax, 7
jne 0x4126e6
push 1
push edi
push edi
lea ecx, [esi + 0x1c]
call fcn.0041ab9e
push eax
lea ecx, [esi + 0x10]
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041aa75
mov ecx, dword [ebp - 4]
call fcn.0041ab9e
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041ac8e
lea ecx, [ebp - 0x2c]
call fcn.00419d9a
cmp dword [ebp - 0x18], edi
jle 0x412717
mov eax, dword [ebp - 0x14]
push edi
cdq
idiv dword [ebp - 0x18]
mov ecx, 0x47a758
push eax
call fcn.004140ee
lea ecx, [ebp - 0x38]
call fcn.00419d9a
inc dword [ebp - 0xc]
add dword [ebp - 0x14], 0x64
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x47a3b0]
jl 0x4123b7
pop esi
pop ebx
mov al, 1
pop edi
leave
ret