Function at 0x43f6d0
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [0x521460]
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 0x43f720
mov eax, dword [0x5213f4]
mov ecx, dword [0x521424]
mov dword [0x521450], eax
mov eax, dword [0x521464]
mov dword [0x521480], edi
mov dword [0x521484], edi
mov dword [0x521420], ecx
mov dword [0x521458], ebp
mov dword [0x52145c], eax
mov eax, dword [0x521470]
mov ecx, dword [0x521474]
mov ebx, eax
or ebx, ecx
jne 0x43f737
mov eax, esi
xor ecx, ecx
jmp 0x43f73f
sub eax, ebp
sbb ecx, dword [0x521464]
xor ebx, ebx
cmp ebx, ecx
jb 0x43f766
ja 0x43f74b
cmp esi, eax
jbe 0x43f766
mov ebx, dword [esp + 0x20]
cmp ebx, 3
je 0x43f762
cmp ebx, 1
je 0x43f762
cmp ebx, 2
je 0x43f762
mov edx, eax
jmp 0x43f76a
xor edx, edx
jmp 0x43f76a
mov ebx, dword [esp + 0x20]
cmp ebx, 2
jne 0x43f7b3
cmp dword [0x4ea618], 0xffffffff
jne 0x43f794
mov ecx, dword [0x521424]
mov eax, dword [0x521464]
mov dword [0x4ea618], ecx
mov dword [0x521428], ebp
mov dword [0x52142c], eax
mov eax, 1
add dword [0x521430], eax
mov ecx, edi
adc dword [0x521434], ecx
add dword [0x521438], eax
adc dword [0x52143c], ecx
test edx, edx
jbe 0x43f801
mov ecx, dword [0x5213f4]
mov eax, dword [esp + 0x14]
push ecx
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
call fcn.004c4800
mov ebp, dword [0x521460]
mov edi, eax
sub esi, edi
xor eax, eax
add esp, 0x10
add ebp, edi
adc dword [0x521464], eax
mov dword [esp + 0x18], esi
mov dword [0x521460], ebp
test ebx, ebx
jne 0x43f805
add dword [0x521480], edi
adc dword [0x521484], eax
jmp 0x43f805
mov dword [esp + 0x18], esi
test esi, esi
jbe 0x43faca
mov eax, dword [0x521468]
test eax, eax
je 0x43fab1
add dword [0x521478], ebp
mov ecx, dword [0x521464]
adc dword [0x52147c], ecx
cmp eax, 1
jne 0x43f84b
mov edx, dword [0x5213f4]
push edx
call fcn.004c4fb1
add esp, 4
test eax, eax
je 0x43f84b
push 0xe
call fcn.004b8b90
cmp dword [0x521468], 2
jne 0x43f884
mov eax, dword [0x5213f4]
push eax
call fcn.004c4fb1
add esp, 4
test eax, eax
je 0x43f884
cmp dword [0x521464], 0
ja 0x43f884
jb 0x43f87d
cmp dword [0x521460], 0x10000
jae 0x43f884
push 0xe
call fcn.004b8b90
cmp dword [0x521468], 1
jne 0x43f8a9
mov ecx, dword [0x521420]
cmp ecx, dword [0x521424]
jne 0x43f8a9
mov edx, dword [0x5213f0]
mov dword [0x521444], edx
jmp 0x43f8fa
mov eax, dword [0x521424]
mov ecx, dword [0x521404]
mov ebx, dword [0x5213f0]
mov esi, dword [0x5213f4]
push eax
push ecx
call fcn.0043f580
push esi
mov ebp, eax
call fcn.004c4622
add esp, 4
push ebp
push ebx
call fcn.004b8e10
mov edx, dword [0x5213f0]
xor esi, esi
push edx
mov dword [0x5213f4], esi
call fcn.004c23c4
mov dword [0x5213f0], esi
mov esi, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [0x521404]
xor eax, eax
mov dword [0x521430], eax
mov dword [0x521434], eax
mov dword [0x521460], eax
mov dword [0x521464], eax
mov eax, dword [0x521424]
push eax
push ecx
call fcn.0043f580
push 0
mov ebx, eax
push ebx
mov ebp, 1
push ebp
call fcn.0040a580
push ebx
call fcn.004c23c4
mov eax, dword [0x521468]
add dword [0x521424], ebp
add esp, 4
cmp eax, 2
jne 0x43f962
mov edx, dword [0x521424]
push edx
call fcn.0043e730
test eax, eax
jne 0x43f962
push 9
call fcn.004b8b90
mov eax, dword [0x51ff6c]
push eax
call fcn.0043e6b0
mov dword [0x5213f0], eax
test eax, eax
jne 0x43f982
push 4
call fcn.004b8b90
mov eax, dword [0x5213f0]
push 0x4da468
push eax
call fcn.004c4e68
add esp, 8
mov dword [0x5213f4], eax
test eax, eax
jne 0x43f9b7
mov ecx, dword [0x5213f0]
push ecx
push eax
mov ecx, 0x51ff10
call fcn.00434330
push 0xa
call fcn.004b8b90
mov eax, dword [0x5213f4]
mov edx, dword [esp + 0x14]
push eax
push esi
lea eax, [edi + edx]
push ebp
push eax
call fcn.004c4800
mov edx, dword [esp + 0x30]
xor ecx, ecx
add esp, 0x10
add edi, eax
add dword [0x521460], eax
adc dword [0x521464], ecx
cmp edx, 3
je 0x43f9f8
cmp edx, ebp
je 0x43f9f8
cmp edx, 2
je 0x43f9f8
add dword [0x521480], eax
adc dword [0x521484], ecx
cmp esi, eax
jbe 0x43fa15
mov eax, dword [0x521468]
cmp eax, 2
je 0x43f94b
push 0xe
call fcn.004b8b90
mov edx, dword [esp + 0x20]
cmp edx, ebp
je 0x43fa27
cmp edx, 3
je 0x43fa27
cmp edx, 2
jne 0x43faca
cmp dword [0x521468], ebp
jne 0x43fa7a
mov ebx, dword [0x521450]
test ebx, ebx
je 0x43fa7a
mov eax, dword [0x521420]
cmp eax, dword [0x521424]
je 0x43fa7a
mov ecx, dword [0x521404]
mov esi, dword [0x521444]
push eax
push ecx
call fcn.0043f580
push ebx
mov ebp, eax
call fcn.004c4622
add esp, 4
push ebp
push esi
call fcn.004b8e10
mov edx, dword [0x521444]
push edx
call fcn.004c23c4
add esp, 4
mov eax, dword [0x5213f0]
mov ecx, dword [0x5213f4]
mov edx, dword [0x521424]
mov dword [0x521444], eax
xor eax, eax
mov dword [0x521458], eax
mov dword [0x52145c], eax
mov eax, edi
pop edi
pop esi
pop ebp
mov dword [0x521450], ecx
mov dword [0x521420], edx
pop ebx
ret 0x10
mov eax, dword [0x5213f4]
push eax
call fcn.004c4fb1
add esp, 4
test eax, eax
je 0x43faca
push 0xe
call fcn.004b8b90
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0x10