Function at 0x403580
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [ebp + 8]
push eax
mov eax, edi
call fcn.00403460
xor esi, esi
add esp, 4
mov dword [ebp - 4], eax
cmp eax, esi
jbe 0x403704
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
push ecx
push 1
push 0x10
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
call fcn.00402e70
lea edx, [ebp - 0x10]
push edx
mov ebx, eax
mov eax, dword [ebp + 0xc]
push 1
push 0x18
call fcn.00402e70
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0xc]
push eax
push 1
push 0x10
mov eax, edi
call fcn.00402e70
lea ecx, [ebp - 8]
push ecx
mov dword [ebp - 0x1c], eax
push 1
push 0x18
mov eax, edi
call fcn.00402e70
add esp, 0x30
mov dword [ebp - 0x18], eax
cmp ebx, esi
je 0x40360b
push ebx
call fcn.00414f60
add esp, 4
mov eax, dword [ebp - 0x20]
cmp eax, esi
je 0x40361b
push eax
call fcn.00414f60
add esp, 4
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0x40362b
push eax
call fcn.00414f60
add esp, 4
mov eax, dword [ebp - 0x18]
cmp eax, esi
je 0x40363b
push eax
call fcn.00414f60
add esp, 4
mov edx, dword [ebp + 0xc]
push edx
call fcn.00403030
add esp, 4
test eax, eax
je 0x40365b
mov esi, dword [eax]
inc esi
shl esi, 6
add esi, dword [eax + 4]
mov ebx, eax
call fcn.00402f70
push edi
xor ebx, ebx
call fcn.00403030
add esp, 4
test eax, eax
je 0x403680
mov ecx, dword [eax]
inc ecx
shl ecx, 6
add ecx, dword [eax + 4]
mov ebx, eax
mov dword [ebp - 0x20], ecx
call fcn.00402f70
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp + 0xc]
sub esi, ebx
sub esi, dword [ebp - 8]
mov ebx, dword [ebp - 4]
sub esi, dword [ebp - 0xc]
push 0x427570
add esi, dword [ebp - 0x10]
push eax
add esi, dword [ebp - 0x14]
add ebx, esi
mov dword [ebp - 4], ebx
call fcn.00414000
mov esi, eax
add esp, 8
test esi, esi
je 0x4036d4
push 2
push 0
push esi
call fcn.004146d2
push esi
call fcn.004145e3
push esi
mov ebx, eax
call fcn.004147bb
add esp, 0x14
mov eax, ebx
cmp ebx, dword [ebp - 4]
jbe 0x4036d8
sub ebx, dword [ebp - 4]
jmp 0x4036dd
xor eax, eax
jmp 0x4036db
mov ebx, dword [ebp - 4]
sub ebx, eax
cmp ebx, 0x80
jbe 0x40388e
mov ecx, dword [ebp + 8]
push 0
push edi
push ecx
mov eax, edi
call fcn.004038a0
add esp, 0xc
test al, al
je 0x40388e
xor esi, esi
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], esi
mov dword [ebp - 8], esi
call section..text
mov dword [ebp - 4], eax
cmp eax, esi
je 0x40388e
lea ecx, [ebp - 8]
mov eax, edi
call section..text
mov dword [ebp - 0x18], eax
cmp eax, esi
je 0x40388e
lea edx, [ebp - 0x10]
push edx
push 1
push 0x10
mov eax, edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call fcn.00402e70
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push 1
push 0x18
mov eax, edi
call fcn.00402e70
push edi
mov dword [ebp - 0x1c], eax
call fcn.00403030
push 0x427578
push edi
mov dword [ebp - 0x20], eax
call fcn.00414000
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x40384c
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
push ebx
push ecx
push 1
push edx
call fcn.004143d5
mov eax, dword [ebp - 4]
push eax
call fcn.00414f60
push ebx
call fcn.004147bb
add esp, 0x18
test esi, esi
je 0x4037be
mov ecx, dword [ebp - 0x10]
push ecx
push esi
push 1
push 0x10
mov eax, edi
call fcn.00402f20
push esi
call fcn.00414f60
add esp, 0x14
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x4037de
mov edx, dword [ebp - 0xc]
push edx
push esi
push 1
push 0x18
mov eax, edi
call fcn.00402f20
push esi
call fcn.00414f60
add esp, 0x14
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4037f5
push edi
mov eax, ebx
call fcn.004031b0
add esp, 4
call fcn.00402f70
push 0x4276c4
push edi
call fcn.00414000
mov esi, eax
add esp, 8
test esi, esi
je 0x403843
mov edx, dword [ebp + 8]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403811
push esi
sub eax, edi
push eax
push 1
push edx
call fcn.004143d5
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0x18]
push esi
push eax
push 1
push edi
call fcn.004143d5
push edi
call fcn.00414f60
push esi
call fcn.004147bb
add esp, 0x28
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push ecx
call fcn.00414f60
mov edx, dword [ebp - 0x18]
push edx
call fcn.00414f60
add esp, 8
test esi, esi
je 0x40386e
push esi
call fcn.00414f60
add esp, 4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40387e
push eax
call fcn.00414f60
add esp, 4
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40388e
push eax
call fcn.00414f60
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret