Function at 0x4351d0
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [0x514e48]
push esi
mov esi, dword [esp + 0x14]
imul esi, dword [esp + 0x18]
push edi
xor edi, edi
cmp dword [esp + 0x20], 1
mov edx, esi
jne 0x435220
mov eax, dword [0x514ddc]
mov ecx, dword [0x514e0c]
mov dword [0x514e38], eax
mov eax, dword [0x514e4c]
mov dword [0x514e68], edi
mov dword [0x514e6c], edi
mov dword [0x514e08], ecx
mov dword [0x514e40], ebp
mov dword [0x514e44], eax
mov eax, dword [0x514e58]
mov ecx, dword [0x514e5c]
mov ebx, eax
or ebx, ecx
jne 0x435237
mov eax, esi
xor ecx, ecx
jmp 0x43523f
sub eax, ebp
sbb ecx, dword [0x514e4c]
xor ebx, ebx
cmp ebx, ecx
jb 0x435266
ja 0x43524b
cmp esi, eax
jbe 0x435266
mov ebx, dword [esp + 0x20]
cmp ebx, 3
je 0x435262
cmp ebx, 1
je 0x435262
cmp ebx, 2
je 0x435262
mov edx, eax
jmp 0x43526a
xor edx, edx
jmp 0x43526a
mov ebx, dword [esp + 0x20]
cmp ebx, 2
jne 0x4352b3
cmp dword [0x4d6dd8], 0xffffffff
jne 0x435294
mov ecx, dword [0x514e0c]
mov eax, dword [0x514e4c]
mov dword [0x4d6dd8], ecx
mov dword [0x514e10], ebp
mov dword [0x514e14], eax
mov eax, 1
add dword [0x514e18], eax
mov ecx, edi
adc dword [0x514e1c], ecx
add dword [0x514e20], eax
adc dword [0x514e24], ecx
test edx, edx
jbe 0x435301
mov ecx, dword [0x514ddc]
mov eax, dword [esp + 0x14]
push ecx
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
call fcn.004b1ec8
mov ebp, dword [0x514e48]
mov edi, eax
sub esi, edi
xor eax, eax
add esp, 0x10
add ebp, edi
adc dword [0x514e4c], eax
mov dword [esp + 0x18], esi
mov dword [0x514e48], ebp
test ebx, ebx
jne 0x435305
add dword [0x514e68], edi
adc dword [0x514e6c], eax
jmp 0x435305
mov dword [esp + 0x18], esi
test esi, esi
jbe 0x4355cc
mov eax, dword [0x514e50]
test eax, eax
je 0x4355b3
add dword [0x514e60], ebp
mov ecx, dword [0x514e4c]
adc dword [0x514e64], ecx
cmp eax, 1
jne 0x43534b
mov edx, dword [0x514ddc]
push edx
call fcn.004b1d32
add esp, 4
test eax, eax
je 0x43534b
push 0xe
call fcn.004a5c80
cmp dword [0x514e50], 2
jne 0x435384
mov eax, dword [0x514ddc]
push eax
call fcn.004b1d32
add esp, 4
test eax, eax
je 0x435384
cmp dword [0x514e4c], 0
ja 0x435384
jb 0x43537d
cmp dword [0x514e48], 0x10000
jae 0x435384
push 0xe
call fcn.004a5c80
cmp dword [0x514e50], 1
jne 0x4353a9
mov ecx, dword [0x514e08]
cmp ecx, dword [0x514e0c]
jne 0x4353a9
mov edx, dword [0x514dd8]
mov dword [0x514e2c], edx
jmp 0x4353fa
mov eax, dword [0x514e0c]
mov ecx, dword [0x514dec]
mov ebx, dword [0x514dd8]
mov esi, dword [0x514ddc]
push eax
push ecx
call fcn.00435080
push esi
mov ebp, eax
call fcn.004b227e
add esp, 4
push ebp
push ebx
call fcn.004a5f00
mov edx, dword [0x514dd8]
xor esi, esi
push edx
mov dword [0x514ddc], esi
call fcn.004af1b0
mov dword [0x514dd8], esi
mov esi, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [0x514dec]
xor eax, eax
mov dword [0x514e18], eax
mov dword [0x514e1c], eax
mov dword [0x514e48], eax
mov dword [0x514e4c], eax
mov eax, dword [0x514e0c]
push eax
push ecx
call fcn.00435080
push 0
mov ebx, eax
push ebx
push 0
mov ebp, 1
push ebp
call fcn.00409db0
push ebx
call fcn.004af1b0
mov eax, dword [0x514e50]
add dword [0x514e0c], ebp
add esp, 4
cmp eax, 2
jne 0x435464
mov edx, dword [0x514e0c]
push edx
call fcn.00434200
test eax, eax
jne 0x435464
push 9
call fcn.004a5c80
mov eax, dword [0x513954]
push eax
call fcn.00434170
mov dword [0x514dd8], eax
test eax, eax
jne 0x435484
push 4
call fcn.004a5c80
mov eax, dword [0x514dd8]
push 0x4c70f8
push eax
call fcn.004b23c0
add esp, 8
mov dword [0x514ddc], eax
test eax, eax
jne 0x4354b9
mov ecx, dword [0x514dd8]
push ecx
push eax
mov ecx, 0x513904
call fcn.0042a140
push 0xa
call fcn.004a5c80
mov eax, dword [0x514ddc]
mov edx, dword [esp + 0x14]
push eax
push esi
lea eax, [edi + edx]
push ebp
push eax
call fcn.004b1ec8
mov edx, dword [esp + 0x30]
xor ecx, ecx
add esp, 0x10
add edi, eax
add dword [0x514e48], eax
adc dword [0x514e4c], ecx
cmp edx, 3
je 0x4354fa
cmp edx, ebp
je 0x4354fa
cmp edx, 2
je 0x4354fa
add dword [0x514e68], eax
adc dword [0x514e6c], ecx
cmp esi, eax
jbe 0x435517
mov eax, dword [0x514e50]
cmp eax, 2
je 0x43544d
push 0xe
call fcn.004a5c80
mov edx, dword [esp + 0x20]
cmp edx, ebp
je 0x435529
cmp edx, 3
je 0x435529
cmp edx, 2
jne 0x4355cc
cmp dword [0x514e50], ebp
jne 0x43557c
mov ebx, dword [0x514e38]
test ebx, ebx
je 0x43557c
mov eax, dword [0x514e08]
cmp eax, dword [0x514e0c]
je 0x43557c
mov ecx, dword [0x514dec]
mov esi, dword [0x514e2c]
push eax
push ecx
call fcn.00435080
push ebx
mov ebp, eax
call fcn.004b227e
add esp, 4
push ebp
push esi
call fcn.004a5f00
mov edx, dword [0x514e2c]
push edx
call fcn.004af1b0
add esp, 4
mov eax, dword [0x514dd8]
mov ecx, dword [0x514ddc]
mov edx, dword [0x514e0c]
mov dword [0x514e2c], eax
xor eax, eax
mov dword [0x514e40], eax
mov dword [0x514e44], eax
mov eax, edi
pop edi
pop esi
pop ebp
mov dword [0x514e38], ecx
mov dword [0x514e08], edx
pop ebx
ret 0x10
mov eax, dword [0x514ddc]
push eax
call fcn.004b1d32
add esp, 4
test eax, eax
je 0x4355cc
push 0xe
call fcn.004a5c80
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0x10