Function at 0x4027b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43008b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
push edi
mov ebx, ecx
mov dword [esp + 0x14], esi
cmp eax, 0xffffffff
jne 0x4027f7
xor eax, eax
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebx + 0x24]
cmp dword [ecx], esi
je 0x40282d
mov edx, dword [ecx]
mov ecx, dword [ebx + 0x34]
mov edi, dword [ecx]
add edi, edx
cmp edx, edi
jae 0x40282d
dec dword [ecx]
mov ebx, dword [ebx + 0x24]
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov dword [ebx], edx
mov byte [ecx], al
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [ebx + 0x54], esi
je 0x402adb
mov edx, dword [ebx + 0x10]
lea edi, [ebx + 0x48]
cmp dword [edx], edi
jne 0x402854
mov ecx, dword [ebx + 0x40]
mov edi, dword [ebx + 0x3c]
mov dword [edx], edi
mov edx, dword [ebx + 0x20]
mov dword [edx], ecx
mov edx, dword [ebx + 0x30]
sub ecx, ecx
mov dword [edx], ecx
cmp dword [ebx + 0x44], esi
jne 0x402889
mov ebx, dword [ebx + 0x54]
movsx eax, al
push ebx
push eax
call fcn.00406430
add esp, 8
cmp eax, 0xffffffff
je 0x402adb
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x58]
push ecx
mov byte [esp + 0x16], al
call fcn.00403490
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x5c]
push eax
mov dword [esp + 0x8c], esi
call fcn.00403690
mov esi, eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x5c]
push edx
mov byte [esp + 0x8c], 1
call fcn.00403690
mov edi, eax
mov byte [esp + 0x84], 2
call fcn.004041e0
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x6c]
mov esi, edi
mov dword [esp + 0x18], eax
call fcn.004041e0
mov ecx, dword [ebx + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea esi, [esp + 0x20]
push esi
mov esi, dword [esp + 0x1c]
add esi, dword [esp + 0x20]
push esi
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x23]
push eax
lea eax, [esp + 0x26]
push eax
lea eax, [ebx + 0x4c]
push eax
call edx
lea edi, [esp + 0x28]
mov esi, eax
mov byte [esp + 0x84], 1
call fcn.004010c0
lea edi, [esp + 0x34]
mov byte [esp + 0x84], 0
call fcn.004010c0
test esi, esi
js 0x402ac6
cmp esi, 1
jg 0x402af2
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x5c]
push ecx
call fcn.00403690
mov esi, eax
mov byte [esp + 0x84], 3
call fcn.004041e0
mov esi, dword [esp + 0x20]
sub esi, eax
lea edi, [esp + 0x40]
mov dword [esp + 0x18], esi
mov byte [esp + 0x84], 0
call fcn.004010c0
test esi, esi
je 0x4029c6
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x5c]
push eax
call fcn.00403690
mov byte [esp + 0x84], 4
or dword [esp + 0x14], 1
mov esi, eax
call fcn.004041e0
mov ecx, dword [ebx + 0x54]
mov esi, dword [esp + 0x18]
push ecx
push esi
push 1
push eax
call fcn.0040aa00
add esp, 0x10
mov byte [esp + 0x13], 1
cmp esi, eax
jne 0x4029cb
mov byte [esp + 0x13], 0
mov dword [esp + 0x84], 0
test byte [esp + 0x14], 1
je 0x4029eb
and dword [esp + 0x14], 0xfffffffe
lea edi, [esp + 0x4c]
call fcn.004010c0
cmp byte [esp + 0x13], 0
jne 0x402ac6
lea edx, [esp + 0x12]
mov byte [ebx + 0x49], 1
cmp dword [esp + 0x24], edx
jne 0x402b41
test esi, esi
jne 0x402a24
cmp dword [esp + 0x6c], 0x20
jae 0x402b6d
push esi
lea eax, [esi + 8]
lea edi, [esp + 0x5c]
call fcn.00403560
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x5c]
push ecx
call fcn.00403690
mov esi, eax
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x5c]
push eax
mov byte [esp + 0x8c], 1
call fcn.00403690
mov edi, eax
mov byte [esp + 0x84], 2
call fcn.004041e0
mov ecx, dword [esp + 0x6c]
mov esi, edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
call fcn.004041e0
mov ecx, dword [ebx + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea esi, [esp + 0x20]
push esi
mov esi, dword [esp + 0x1c]
add esi, dword [esp + 0x20]
push esi
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x23]
push eax
lea eax, [esp + 0x26]
push eax
lea eax, [ebx + 0x4c]
push eax
call edx
lea edi, [esp + 0x28]
mov esi, eax
mov byte [esp + 0x84], 1
call fcn.004010c0
lea edi, [esp + 0x34]
mov byte [esp + 0x84], 0
call fcn.004010c0
test esi, esi
jns 0x402940
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0x88], 0xffffffff
call fcn.00401f00
or eax, 0xffffffff
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp esi, 3
jne 0x402ac6
mov ebx, dword [ebx + 0x54]
movsx eax, byte [esp + 0x12]
push ebx
push eax
call fcn.00406430
add esp, 8
cmp eax, 0xffffffff
je 0x402b13
mov esi, dword [ebp + 8]
jmp 0x402b16
or esi, 0xffffffff
lea ecx, [esp + 0x58]
push ecx
mov dword [esp + 0x88], 0xffffffff
call fcn.00401f00
mov eax, esi
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x58]
push eax
mov dword [esp + 0x88], 0xffffffff
call fcn.00401f00
mov ecx, dword [esp + 0x7c]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x58]
push ecx
jmp 0x402acb