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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x47f538]
push esi
xor esi, esi
mov dword [ebp - 0x1c], eax
cmp eax, esi
mov dword [ebp - 0xc], esi
jle 0x413c1b
push ebx
push edi
mov dword [ebp - 0x18], 0x64
mov edi, 0x42cc50
push dword [ebp - 0xc]
mov ecx, 0x47f52c
call fcn.0041f2e9
mov ebx, eax
mov dword [ebp - 0x10], ebx
push dword [ebx + 0x28]
call fcn.004134e1
test al, al
pop ecx
je 0x413c03
lea eax, [ebx + 4]
mov ecx, 0x47f028
push eax
mov dword [ebp - 8], eax
call fcn.00416e92
add ebx, 0x10
mov ecx, 0x47f028
push ebx
call fcn.00416e92
mov eax, dword [ebp - 0x10]
mov ecx, 0x47f028
add eax, 0x1c
push eax
mov dword [ebp - 4], eax
call fcn.00416e92
mov ecx, dword [ebp - 8]
push 1
push esi
push 0x42cc6c
call fcn.0041d1c1
mov ecx, dword [ebp - 8]
push eax
push esi
call fcn.0041d67b
push eax
lea ecx, [ebp - 0x3c]
call fcn.0041c87f
push 1
lea ecx, [ebp - 0x3c]
call fcn.0041d704
push eax
call fcn.0040e4b7
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
call fcn.0041d704
push eax
call fcn.0040e7f9
test al, al
pop ecx
jne 0x41396d
mov ecx, dword [ebp - 8]
call fcn.0041d704
push 0x47f804
push eax
mov ecx, 0x47f7f8
call fcn.0042276d
mov ecx, dword [ebp - 8]
push esi
push 0x80
push 4
push esi
push 1
push 0x40000000
call fcn.0041d704
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 0x413a00
mov ecx, dword [ebp - 8]
push esi
push 0x80
push 4
push esi
push 1
push 0xc0000000
call fcn.0041d704
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x413bfb
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.0041c87f
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jbe 0x4139d6
push esi
push esi
push edi
lea ecx, [ebp - 0x48]
call fcn.0041d406
lea eax, [ebp - 0x24]
push esi
push eax
lea ecx, [ebp - 0x48]
push dword [ebp - 0x48]
mov dword [ebp - 0x24], esi
call fcn.0041d704
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 0x413bde
lea ecx, [ebp - 0x30]
call fcn.0041c7ab
mov ecx, dword [ebp - 8]
push esi
push esi
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041d4ab
test eax, eax
jl 0x413b13
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
cmp eax, esi
jne 0x413a4e
mov ecx, dword [ebp - 4]
push esi
push edi
call fcn.0041ca2d
push esi
push esi
mov ecx, dword [ebp - 4]
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041d406
jmp 0x413bca
cmp eax, 2
jne 0x413a83
push esi
push edi
mov ecx, ebx
call fcn.0041ca2d
push esi
push esi
mov ecx, ebx
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041d0b6
cmp eax, 0xffffffff
je 0x413b13
mov ebx, dword [ebx]
push esi
lea eax, [ebx + eax - 2]
jmp 0x413b21
cmp eax, 3
jne 0x413aaa
push esi
push edi
mov ecx, ebx
call fcn.0041ca2d
push esi
push 1
push esi
mov ecx, ebx
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041cdfc
jmp 0x413bca
cmp eax, 4
jne 0x413ae4
push esi
push edi
mov ecx, ebx
call fcn.0041ca2d
mov ecx, dword [ebp - 4]
push esi
push edi
call fcn.0041ca2d
push esi
push esi
mov ecx, ebx
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041d0b6
cmp eax, 0xffffffff
je 0x413b13
mov ebx, dword [ebx]
push esi
add ebx, eax
push ebx
jmp 0x413a38
cmp eax, 5
jne 0x413b27
push esi
push edi
mov ecx, ebx
call fcn.0041ca2d
mov ecx, dword [ebp - 4]
push esi
push edi
call fcn.0041ca2d
push esi
push esi
mov ecx, ebx
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041d0b6
cmp eax, 0xffffffff
jne 0x413b20
lea ecx, [ebp - 0x30]
call fcn.0041c8e1
jmp 0x413bfb
push esi
push eax
jmp 0x413a38
cmp eax, 6
jne 0x413ba8
lea ecx, [ebp - 0x60]
call fcn.0041c7ab
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x14], esi
call fcn.0041c7ab
push dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
call fcn.0041d3b8
test al, al
je 0x413b8a
lea eax, [ebp - 0x60]
lea ecx, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041d315
mov ecx, ebx
call fcn.0041d704
push eax
lea ecx, [ebp - 0x60]
call fcn.0041d643
test al, al
jne 0x413b3f
lea eax, [ebp - 0x60]
lea ecx, [ebp - 0x54]
push eax
call fcn.0041caab
push esi
push edi
lea ecx, [ebp - 0x54]
call fcn.0041ca2d
jmp 0x413b3f
lea eax, [ebp - 0x54]
lea ecx, [ebp - 0x30]
push eax
call fcn.0041c966
lea ecx, [ebp - 0x54]
call fcn.0041c8e1
lea ecx, [ebp - 0x60]
call fcn.0041c8e1
jmp 0x413bca
cmp eax, 7
jne 0x413bca
mov ecx, dword [ebp - 4]
push 1
push esi
push esi
call fcn.0041d704
push eax
mov ecx, ebx
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041d5df
mov ecx, dword [ebp - 8]
call fcn.0041d704
push eax
lea ecx, [ebp - 0x30]
call fcn.0041d7f4
lea ecx, [ebp - 0x30]
call fcn.0041c8e1
cmp dword [ebp - 0x1c], esi
jle 0x413bfb
mov eax, dword [ebp - 0x18]
push esi
cdq
idiv dword [ebp - 0x1c]
mov ecx, 0x47f8f0
push eax
call fcn.00415658
lea ecx, [ebp - 0x3c]
call fcn.0041c8e1
inc dword [ebp - 0xc]
add dword [ebp - 0x18], 0x64
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x47f538]
jl 0x413891
pop edi
pop ebx
mov al, 1
pop esi
leave
ret