Function at 0x4047a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42e2eb
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x438300]
xor eax, esp
mov dword [esp + 0x224], eax
push ebx
push esi
mov eax, dword [0x438300]
xor eax, esp
push eax
lea eax, [esp + 0x238]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
mov dword [esp + 0x28], eax
mov eax, 0x10
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov edx, 4
mul edx
seto cl
mov dword [esp + 0x24], esi
neg ecx
or ecx, eax
push ecx
call fcn.00414fa9
mov dword [esp + 0x14], eax
xor eax, eax
add esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x240], eax
mov ecx, dword [esi]
lea edx, [esp + 0x10]
mov ebx, edi
call fcn.004029a0
mov ebx, eax
test ebx, ebx
je 0x404855
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x10]
push eax
call fcn.004148f0
add esp, 4
mov eax, ebx
jmp 0x404aa0
mov esi, dword [ebp + 0xc]
mov eax, 0x828cbfbf
imul esi
add edx, esi
sar edx, 8
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, eax
imul ecx, ecx, 0x1f6
sub esi, ecx
neg esi
sbb esi, esi
neg esi
add esi, eax
jne 0x404889
cmp dword [ebp + 0x10], esi
je 0x404889
mov esi, 1
mov eax, dword [esp + 0x14]
cmp esi, eax
jle 0x4048c6
push 0
lea edx, [esp + 0x14]
push edx
sub esi, eax
push esi
push edi
call fcn.00403de0
mov esi, eax
test esi, esi
je 0x404905
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x10]
push eax
call fcn.004148f0
add esp, 4
mov eax, esi
jmp 0x404aa0
jge 0x404905
lea ecx, [esp + 0x10]
push ecx
mov eax, esi
mov ebx, edi
call fcn.00403f00
mov ebx, eax
test ebx, ebx
je 0x4048fb
mov dword [esp + 0x240], 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call fcn.004148f0
add esp, 4
mov eax, ebx
jmp 0x404aa0
push esi
lea esi, [esp + 0x14]
call fcn.00405970
xor ebx, ebx
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
jle 0x404a7c
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0x20]
cmp eax, 0x1f6
jl 0x404928
mov eax, 0x1f6
mov word [esp + 0x34], ax
mov eax, dword [esp + 0x14]
dec eax
cmp ebx, eax
mov dword [esp + 0x2c], 0x2a544144
jge 0x40494c
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + ebx*4 + 4]
mov dword [esp + 0x30], edx
jmp 0x404954
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x10]
mov eax, dword [eax + ebx*4]
test eax, eax
jl 0x40496e
mov ecx, dword [edi + 8]
push 0
push eax
push ecx
call fcn.00414d74
add esp, 0xc
mov edx, dword [edi + 8]
push edx
push 1
lea eax, [esp + 0x34]
push 0xa
push eax
call fcn.00414a5d
dec eax
add esp, 0x10
neg eax
sbb eax, eax
and eax, 7
mov esi, eax
jne 0x404a44
mov ecx, dword [edi + 8]
movzx eax, word [esp + 0x34]
mov edx, dword [esp + 0x28]
push ecx
push 1
push eax
mov eax, dword [esp + 0x2c]
add edx, eax
push edx
call fcn.00414a5d
dec eax
add esp, 0x10
neg eax
sbb eax, eax
and eax, 7
mov esi, eax
jne 0x404a60
mov ax, word [esp + 0x34]
mov ecx, 0x1f6
cmp ax, cx
jae 0x404a1d
movzx edx, ax
mov eax, ecx
sub eax, edx
push eax
lea ecx, [esp + 0x3a]
push 0
push ecx
call fcn.00415d50
movzx edx, word [esp + 0x40]
mov ecx, dword [edi + 8]
add esp, 0xc
push ecx
mov eax, 0x1f6
sub eax, edx
push 1
push eax
lea edx, [esp + 0x42]
push edx
call fcn.00414a5d
dec eax
add esp, 0x10
neg eax
sbb eax, eax
and eax, 7
mov esi, eax
jne 0x4048a7
mov ax, word [esp + 0x34]
movzx eax, ax
add dword [esp + 0x20], eax
inc ebx
cmp ebx, dword [esp + 0x14]
jl 0x404915
cmp dword [esp + 0x14], 0
jle 0x404a7c
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
mov eax, dword [esp + 0x24]
mov dword [eax], edx
jmp 0x404a86
mov dword [esp + 0x240], 0xffffffff
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004148f0
add esp, 4
mov eax, esi
jmp 0x404aa0
mov dword [esp + 0x240], 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call fcn.004148f0
add esp, 4
mov eax, esi
jmp 0x404aa0
mov ecx, dword [esp + 0x24]
mov dword [ecx], 0
mov dword [esp + 0x240], 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call fcn.004148f0
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x238]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x224]
xor ecx, esp
call fcn.0041358c
mov esp, ebp
pop ebp
ret 0xc