Function at 0x1004d20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
push 1
mov ebx, ecx
pop esi
xor edi, edi
lea ecx, [ebp - 0x34]
mov dword [ebp - 8], esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], edi
call fcn.0100741c
mov ecx, dword [ebx + 0x9c]
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x1c], edi
call fcn.01006629
test eax, eax
jl 0x1004d9f
cmp dword [ebx + 0x7c], edi
je 0x1004d85
mov eax, dword [ebx + 0xb8]
lea ecx, [ebx + 0xb0]
inc eax
cmp dword [ecx], eax
je 0x1004d85
mov eax, dword [ebx + 0xb4]
mov dword [ebp - 0x1c], esi
shl al, 4
or al, 1
mov byte [ebp - 0xc], al
mov al, byte [ecx]
mov byte [ebp - 0xb], al
jmp 0x1004d8d
and byte [ebp - 0xc], 0
and byte [ebp - 0xb], 0
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xc]
push 2
push eax
call fcn.0100bf5d
test eax, eax
jge 0x1004daf
lea ecx, [ebp - 0x34]
call fcn.0100c7ac
or eax, 0xffffffff
jmp 0x1005083
fld qword [0x10014c8]
fdiv qword [ebx + 0x90]
mov edi, dword [ebx + 0xc0]
mov esi, dword [ebx + 0xc4]
call sub.MSVCRT.dll__ftol
mov ecx, edi
push 0
sub ecx, eax
mov eax, esi
mov esi, 0x2710
mov dword [ebp - 0x28], ecx
sbb eax, edx
push esi
push eax
push ecx
mov dword [ebp - 0x24], eax
call fcn.01015000
push 0
push esi
push dword [ebx + 0xc4]
mov ecx, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
push edi
call fcn.01015000
mov ecx, dword [ebp - 0x14]
sub ecx, eax
mov eax, dword [ebp - 0x10]
sbb eax, edx
xor edi, edi
push edi
push esi
push eax
push ecx
call fcn.01014fc0
mov ecx, dword [ebp - 4]
push edx
push eax
push dword [ebx + 0xc4]
push dword [ebx + 0xc0]
call fcn.0100bfd9
mov eax, dword [ebp - 0x28]
push dword [ebp - 4]
mov dword [ebx + 0xc0], eax
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x60]
mov dword [ebx + 0xc4], eax
call fcn.0100ba80
push 1
lea ecx, [ebp - 0x60]
call fcn.0100bb08
mov eax, dword [ebx + 0xd0]
lea ecx, [ebp - 0x60]
and eax, 0xff
push eax
call fcn.0100bbac
mov esi, dword [ebp + 0xc]
cmp esi, 0xffffffff
jne 0x1004e72
xor eax, eax
jmp 0x1004e7b
mov eax, dword [ebx + 0x88]
imul eax, esi
push eax
lea ecx, [ebp - 0x60]
call fcn.0100bc2d
test eax, eax
jl 0x1004fc0
cmp esi, 0xffffffff
jne 0x1004e96
push dword [ebp + 0x10]
jmp 0x1004ea1
mov eax, dword [ebx + 0x74]
imul eax, dword [ebx + 0x88]
push eax
lea ecx, [ebp - 0x34]
call fcn.010074a0
fld qword [ebx + 0xc8]
fmul qword [0x10014a8]
call sub.MSVCRT.dll__ftol
push eax
lea ecx, [ebp - 0x34]
call fcn.01005ac6
push 8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x18], eax
push edi
push 8
push eax
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
call fcn.010065b5
test eax, eax
jl 0x1004fc0
push 8
lea ecx, [ebp - 0x60]
push dword [ebp - 0x18]
call fcn.0100bcae
test eax, eax
jl 0x1004fc0
cmp esi, 0xffffffff
jne 0x1004f0b
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
jmp 0x1004f1c
cmp dword [ebx + 0x78], edi
je 0x1004f32
mov ecx, dword [ebx + 0x88]
imul esi, ecx
add esi, dword [ebp + 8]
mov edi, dword [ebx + 0xdc]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x1004f88
mov ecx, dword [ebx + 0x74]
mov eax, dword [ebx + 0x88]
xor edx, edx
mov dword [ebp - 0x10], edi
div ecx
cmp ecx, edi
mov dword [ebp - 0x24], eax
jbe 0x1004f88
mov edx, eax
mov dword [ebp - 0x14], edi
imul edx, esi
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
imul esi, dword [ebx + 0x88]
add esi, dword [ebp + 8]
add edi, dword [ebx + 0xdc]
mov ecx, eax
add esi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x14], eax
and ecx, 3
inc dword [ebp - 0x10]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebx + 0x74]
jb 0x1004f51
cmp dword [ebp + 0xc], 0xffffffff
jne 0x1004f93
mov eax, dword [ebp + 0x10]
jmp 0x1004f9a
mov ax, word [ebx + 0x88]
movzx eax, ax
push eax
lea ecx, [ebp - 0x60]
push dword [ebx + 0xdc]
call fcn.0100bd35
test eax, eax
jl 0x1004fc0
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0x60]
push edx
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jge 0x1004fd1
mov ecx, dword [ebp - 4]
or dword [ebp - 8], 0xffffffff
call fcn.0100bf36
jmp 0x1005068
mov ecx, dword [ebx + 0x6c]
mov edi, dword [ebx + 0xd8]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
push dword [ebx + 0x6c]
mov ecx, dword [ebp - 4]
push dword [ebx + 0xd8]
call fcn.0100c0db
mov ecx, dword [ebp - 4]
test eax, eax
jge 0x100500b
call fcn.0100bf36
jmp 0x1005064
call fcn.0100bf36
cmp dword [ebp - 0x1c], 0
je 0x100503d
mov edi, dword [ebx + 0xb4]
mov ecx, dword [ebx + 0x6c]
dec edi
mov esi, dword [ebx + 0xd8]
imul edi, ecx
add edi, dword [ebx + 0xd4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x20]
push 0
push eax
push dword [ebx + 0x6c]
push dword [ebx + 0xd8]
push dword [ebx + 0xa4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1005064
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebx + 0x6c]
je 0x1005068
or dword [ebp - 8], 0xffffffff
push dword [ebp - 0x18]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [ebp - 0x60], 0x10014d0
lea ecx, [ebp - 0x34]
call fcn.0100c7ac
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0xc