Function at 0x43e8c0
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [0x51fcf8]
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 0x43e910
mov eax, dword [0x51fc8c]
mov ecx, dword [0x51fcbc]
mov dword [0x51fce8], eax
mov eax, dword [0x51fcfc]
mov dword [0x51fd18], edi
mov dword [0x51fd1c], edi
mov dword [0x51fcb8], ecx
mov dword [0x51fcf0], ebp
mov dword [0x51fcf4], eax
mov eax, dword [0x51fd08]
mov ecx, dword [0x51fd0c]
mov ebx, eax
or ebx, ecx
jne 0x43e927
mov eax, esi
xor ecx, ecx
jmp 0x43e92f
sub eax, ebp
sbb ecx, dword [0x51fcfc]
xor ebx, ebx
cmp ebx, ecx
jb 0x43e956
ja 0x43e93b
cmp esi, eax
jbe 0x43e956
mov ebx, dword [esp + 0x20]
cmp ebx, 3
je 0x43e952
cmp ebx, 1
je 0x43e952
cmp ebx, 2
je 0x43e952
mov edx, eax
jmp 0x43e95a
xor edx, edx
jmp 0x43e95a
mov ebx, dword [esp + 0x20]
cmp ebx, 2
jne 0x43e9a3
cmp dword [0x4e8f38], 0xffffffff
jne 0x43e984
mov ecx, dword [0x51fcbc]
mov eax, dword [0x51fcfc]
mov dword [0x4e8f38], ecx
mov dword [0x51fcc0], ebp
mov dword [0x51fcc4], eax
mov eax, 1
add dword [0x51fcc8], eax
mov ecx, edi
adc dword [0x51fccc], ecx
add dword [0x51fcd0], eax
adc dword [0x51fcd4], ecx
test edx, edx
jbe 0x43e9f1
mov ecx, dword [0x51fc8c]
mov eax, dword [esp + 0x14]
push ecx
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
call fcn.004c2576
mov ebp, dword [0x51fcf8]
mov edi, eax
sub esi, edi
xor eax, eax
add esp, 0x10
add ebp, edi
adc dword [0x51fcfc], eax
mov dword [esp + 0x18], esi
mov dword [0x51fcf8], ebp
test ebx, ebx
jne 0x43e9f5
add dword [0x51fd18], edi
adc dword [0x51fd1c], eax
jmp 0x43e9f5
mov dword [esp + 0x18], esi
test esi, esi
jbe 0x43ecba
mov eax, dword [0x51fd00]
test eax, eax
je 0x43eca1
add dword [0x51fd10], ebp
mov ecx, dword [0x51fcfc]
adc dword [0x51fd14], ecx
cmp eax, 1
jne 0x43ea3b
mov edx, dword [0x51fc8c]
push edx
call fcn.004c2cf2
add esp, 4
test eax, eax
je 0x43ea3b
push 0xe
call fcn.004b6c10
cmp dword [0x51fd00], 2
jne 0x43ea74
mov eax, dword [0x51fc8c]
push eax
call fcn.004c2cf2
add esp, 4
test eax, eax
je 0x43ea74
cmp dword [0x51fcfc], 0
ja 0x43ea74
jb 0x43ea6d
cmp dword [0x51fcf8], 0x10000
jae 0x43ea74
push 0xe
call fcn.004b6c10
cmp dword [0x51fd00], 1
jne 0x43ea99
mov ecx, dword [0x51fcb8]
cmp ecx, dword [0x51fcbc]
jne 0x43ea99
mov edx, dword [0x51fc88]
mov dword [0x51fcdc], edx
jmp 0x43eaea
mov eax, dword [0x51fcbc]
mov ecx, dword [0x51fc9c]
mov ebx, dword [0x51fc88]
mov esi, dword [0x51fc8c]
push eax
push ecx
call fcn.0043e770
push esi
mov ebp, eax
call fcn.004c2398
add esp, 4
push ebp
push ebx
call fcn.004b6e90
mov edx, dword [0x51fc88]
xor esi, esi
push edx
mov dword [0x51fc8c], esi
call fcn.004bff04
mov dword [0x51fc88], esi
mov esi, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [0x51fc9c]
xor eax, eax
mov dword [0x51fcc8], eax
mov dword [0x51fccc], eax
mov dword [0x51fcf8], eax
mov dword [0x51fcfc], eax
mov eax, dword [0x51fcbc]
push eax
push ecx
call fcn.0043e770
push 0
mov ebx, eax
push ebx
mov ebp, 1
push ebp
call fcn.00409fa0
push ebx
call fcn.004bff04
mov eax, dword [0x51fd00]
add dword [0x51fcbc], ebp
add esp, 4
cmp eax, 2
jne 0x43eb52
mov edx, dword [0x51fcbc]
push edx
call fcn.0043d920
test eax, eax
jne 0x43eb52
push 9
call fcn.004b6c10
mov eax, dword [0x51e804]
push eax
call fcn.0043d8a0
mov dword [0x51fc88], eax
test eax, eax
jne 0x43eb72
push 4
call fcn.004b6c10
mov eax, dword [0x51fc88]
push 0x4d847c
push eax
call fcn.004c2c28
add esp, 8
mov dword [0x51fc8c], eax
test eax, eax
jne 0x43eba7
mov ecx, dword [0x51fc88]
push ecx
push eax
mov ecx, 0x51e7a8
call fcn.004337a0
push 0xa
call fcn.004b6c10
mov eax, dword [0x51fc8c]
mov edx, dword [esp + 0x14]
push eax
push esi
lea eax, [edi + edx]
push ebp
push eax
call fcn.004c2576
mov edx, dword [esp + 0x30]
xor ecx, ecx
add esp, 0x10
add edi, eax
add dword [0x51fcf8], eax
adc dword [0x51fcfc], ecx
cmp edx, 3
je 0x43ebe8
cmp edx, ebp
je 0x43ebe8
cmp edx, 2
je 0x43ebe8
add dword [0x51fd18], eax
adc dword [0x51fd1c], ecx
cmp esi, eax
jbe 0x43ec05
mov eax, dword [0x51fd00]
cmp eax, 2
je 0x43eb3b
push 0xe
call fcn.004b6c10
mov edx, dword [esp + 0x20]
cmp edx, ebp
je 0x43ec17
cmp edx, 3
je 0x43ec17
cmp edx, 2
jne 0x43ecba
cmp dword [0x51fd00], ebp
jne 0x43ec6a
mov ebx, dword [0x51fce8]
test ebx, ebx
je 0x43ec6a
mov eax, dword [0x51fcb8]
cmp eax, dword [0x51fcbc]
je 0x43ec6a
mov ecx, dword [0x51fc9c]
mov esi, dword [0x51fcdc]
push eax
push ecx
call fcn.0043e770
push ebx
mov ebp, eax
call fcn.004c2398
add esp, 4
push ebp
push esi
call fcn.004b6e90
mov edx, dword [0x51fcdc]
push edx
call fcn.004bff04
add esp, 4
mov eax, dword [0x51fc88]
mov ecx, dword [0x51fc8c]
mov edx, dword [0x51fcbc]
mov dword [0x51fcdc], eax
xor eax, eax
mov dword [0x51fcf0], eax
mov dword [0x51fcf4], eax
mov eax, edi
pop edi
pop esi
pop ebp
mov dword [0x51fce8], ecx
mov dword [0x51fcb8], edx
pop ebx
ret 0x10
mov eax, dword [0x51fc8c]
push eax
call fcn.004c2cf2
add esp, 4
test eax, eax
je 0x43ecba
push 0xe
call fcn.004b6c10
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0x10