Function at 0x437c70
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [0x507838]
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 0x437cc0
mov eax, dword [0x5077cc]
mov ecx, dword [0x5077fc]
mov dword [0x507828], eax
mov eax, dword [0x50783c]
mov dword [0x507858], edi
mov dword [0x50785c], edi
mov dword [0x5077f8], ecx
mov dword [0x507830], ebp
mov dword [0x507834], eax
mov eax, dword [0x507848]
mov ecx, dword [0x50784c]
mov ebx, eax
or ebx, ecx
jne 0x437cd7
mov eax, esi
xor ecx, ecx
jmp 0x437cdf
sub eax, ebp
sbb ecx, dword [0x50783c]
xor ebx, ebx
cmp ebx, ecx
jb 0x437d06
ja 0x437ceb
cmp esi, eax
jbe 0x437d06
mov ebx, dword [esp + 0x20]
cmp ebx, 3
je 0x437d02
cmp ebx, 1
je 0x437d02
cmp ebx, 2
je 0x437d02
mov edx, eax
jmp 0x437d0a
xor edx, edx
jmp 0x437d0a
mov ebx, dword [esp + 0x20]
cmp ebx, 2
jne 0x437d53
cmp dword [0x4d6f58], 0xffffffff
jne 0x437d34
mov ecx, dword [0x5077fc]
mov eax, dword [0x50783c]
mov dword [0x4d6f58], ecx
mov dword [0x507800], ebp
mov dword [0x507804], eax
mov eax, 1
add dword [0x507808], eax
mov ecx, edi
adc dword [0x50780c], ecx
add dword [0x507810], eax
adc dword [0x507814], ecx
test edx, edx
jbe 0x437da1
mov ecx, dword [0x5077cc]
mov eax, dword [esp + 0x14]
push ecx
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
call fcn.004b20f8
mov ebp, dword [0x507838]
mov edi, eax
sub esi, edi
xor eax, eax
add esp, 0x10
add ebp, edi
adc dword [0x50783c], eax
mov dword [esp + 0x18], esi
mov dword [0x507838], ebp
test ebx, ebx
jne 0x437da5
add dword [0x507858], edi
adc dword [0x50785c], eax
jmp 0x437da5
mov dword [esp + 0x18], esi
test esi, esi
jbe 0x43806c
mov eax, dword [0x507840]
test eax, eax
je 0x438053
add dword [0x507850], ebp
mov ecx, dword [0x50783c]
adc dword [0x507854], ecx
cmp eax, 1
jne 0x437deb
mov edx, dword [0x5077cc]
push edx
call fcn.004b1f62
add esp, 4
test eax, eax
je 0x437deb
push 0xe
call fcn.004a6030
cmp dword [0x507840], 2
jne 0x437e24
mov eax, dword [0x5077cc]
push eax
call fcn.004b1f62
add esp, 4
test eax, eax
je 0x437e24
cmp dword [0x50783c], 0
ja 0x437e24
jb 0x437e1d
cmp dword [0x507838], 0x10000
jae 0x437e24
push 0xe
call fcn.004a6030
cmp dword [0x507840], 1
jne 0x437e49
mov ecx, dword [0x5077f8]
cmp ecx, dword [0x5077fc]
jne 0x437e49
mov edx, dword [0x5077c8]
mov dword [0x50781c], edx
jmp 0x437e9a
mov eax, dword [0x5077fc]
mov ecx, dword [0x5077dc]
mov ebx, dword [0x5077c8]
mov esi, dword [0x5077cc]
push eax
push ecx
call fcn.00437b00
push esi
mov ebp, eax
call fcn.004b24ae
add esp, 4
push ebp
push ebx
call fcn.004a62b0
mov edx, dword [0x5077c8]
xor esi, esi
push edx
mov dword [0x5077cc], esi
call fcn.004af901
mov dword [0x5077c8], esi
mov esi, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [0x5077dc]
xor eax, eax
mov dword [0x507808], eax
mov dword [0x50780c], eax
mov dword [0x507838], eax
mov dword [0x50783c], eax
mov eax, dword [0x5077fc]
push eax
push ecx
call fcn.00437b00
push 0
mov ebx, eax
push ebx
push 0
mov ebp, 1
push ebp
call fcn.0040a030
push ebx
call fcn.004af901
mov eax, dword [0x507840]
add dword [0x5077fc], ebp
add esp, 4
cmp eax, 2
jne 0x437f04
mov edx, dword [0x5077fc]
push edx
call fcn.00436c80
test eax, eax
jne 0x437f04
push 9
call fcn.004a6030
mov eax, dword [0x506344]
push eax
call fcn.00436be0
mov dword [0x5077c8], eax
test eax, eax
jne 0x437f24
push 4
call fcn.004a6030
mov eax, dword [0x5077c8]
push 0x4c7108
push eax
call fcn.004b25f0
add esp, 8
mov dword [0x5077cc], eax
test eax, eax
jne 0x437f59
mov ecx, dword [0x5077c8]
push ecx
push eax
mov ecx, 0x5062f4
call fcn.0042cb40
push 0xa
call fcn.004a6030
mov eax, dword [0x5077cc]
mov edx, dword [esp + 0x14]
push eax
push esi
lea eax, [edi + edx]
push ebp
push eax
call fcn.004b20f8
mov edx, dword [esp + 0x30]
xor ecx, ecx
add esp, 0x10
add edi, eax
add dword [0x507838], eax
adc dword [0x50783c], ecx
cmp edx, 3
je 0x437f9a
cmp edx, ebp
je 0x437f9a
cmp edx, 2
je 0x437f9a
add dword [0x507858], eax
adc dword [0x50785c], ecx
cmp esi, eax
jbe 0x437fb7
mov eax, dword [0x507840]
cmp eax, 2
je 0x437eed
push 0xe
call fcn.004a6030
mov edx, dword [esp + 0x20]
cmp edx, ebp
je 0x437fc9
cmp edx, 3
je 0x437fc9
cmp edx, 2
jne 0x43806c
cmp dword [0x507840], ebp
jne 0x43801c
mov ebx, dword [0x507828]
test ebx, ebx
je 0x43801c
mov eax, dword [0x5077f8]
cmp eax, dword [0x5077fc]
je 0x43801c
mov ecx, dword [0x5077dc]
mov esi, dword [0x50781c]
push eax
push ecx
call fcn.00437b00
push ebx
mov ebp, eax
call fcn.004b24ae
add esp, 4
push ebp
push esi
call fcn.004a62b0
mov edx, dword [0x50781c]
push edx
call fcn.004af901
add esp, 4
mov eax, dword [0x5077c8]
mov ecx, dword [0x5077cc]
mov edx, dword [0x5077fc]
mov dword [0x50781c], eax
xor eax, eax
mov dword [0x507830], eax
mov dword [0x507834], eax
mov eax, edi
pop edi
pop esi
pop ebp
mov dword [0x507828], ecx
mov dword [0x5077f8], edx
pop ebx
ret 0x10
mov eax, dword [0x5077cc]
push eax
call fcn.004b1f62
add esp, 4
test eax, eax
je 0x43806c
push 0xe
call fcn.004a6030
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0x10