Function at 0x401f30
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov ebp, eax
push esi
push ebx
xor esi, esi
mov edi, edx
sub esp, 0x3c
mov ebx, dword [0x4350c4]
test ebx, ebx
jne 0x402052
cmp byte [0x4350c1], 0
je 0x402020
cmp dword [0x435084], edi
jb 0x4021c0
mov eax, esi
movsx edi, cl
test al, al
jne 0x402229
mov eax, dword [0x42802c]
mov edx, dword [0x4350dc]
mov ecx, 4
mov dword [esp], eax
mov eax, dword [0x4350d8]
call fcn.00401e60
cmp byte [0x4350c0], 0
je 0x402005
mov esi, 1
mov ebx, ebp
sub ebx, dword [0x435100]
mov eax, dword [0x435088]
mov edx, dword [0x43508c]
mov ecx, ebx
sar ebx, 0x1f
add ecx, eax
adc ebx, edx
mov dword [esp + 0x18], ecx
cmp ebx, edx
mov dword [esp + 0x1c], ebx
jbe 0x402042
cmp dword [0x435064], 2
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
je 0x402095
mov eax, esi
test al, al
jne 0x4021b0
mov eax, dword [0x428028]
mov edx, dword [esp + 0x24]
mov ecx, 6
mov dword [esp], eax
mov eax, dword [esp + 0x20]
call fcn.00401e60
cmp byte [0x435138], 0
jne 0x402172
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00401da0
cmp byte [0x4350c0], 0
movsx edi, cl
jne 0x401f9c
mov eax, esi
test al, al
jne 0x402244
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
jae 0x402235
call fcn.004014e0
jmp 0x401fc4
mov dword [esp + 0x18], ecx
mov esi, 1
call fcn.00401e00
mov edx, dword [0x4350cc]
mov ecx, dword [esp + 0x18]
test edx, edx
jne 0x401f4b
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], 0
xor esi, esi
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov ecx, dword [esp + 0x18]
jmp 0x401f4b
mov eax, dword [0x435068]
test eax, eax
jne 0x401fe1
mov ebp, dword [0x428008]
mov eax, dword [0x435050]
lea edx, [ebp + 0xfffffff]
mov dword [esp + 0x20], eax
shl edx, 4
mov ebx, dword [eax + edx]
mov ecx, dword [eax + edx + 4]
lea eax, [eax + edx + 0x10]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x1c]
cmp ebx, dword [eax + 4]
jl 0x40226c
jle 0x402260
mov ebx, dword [0x435048]
lea eax, [ebp + 1]
mov dword [0x428008], eax
cmp eax, ebx
mov eax, dword [esp + 0x20]
lea eax, [eax + edx + 0x20]
jge 0x402150
mov ecx, dword [esp + 0x1c]
cmp dword [eax + 4], ecx
jg 0x402150
jl 0x402109
mov ecx, dword [esp + 0x18]
cmp dword [eax], ecx
ja 0x402150
mov eax, dword [esp + 0x20]
lea ecx, [ebp + 2]
lea edx, [eax + edx + 0x30]
mov eax, esi
mov byte [esp + 0x2c], al
lea esi, [esi]
cmp ecx, ebx
mov ebp, ecx
je 0x4022e1
mov eax, edx
add ecx, 1
add edx, 0x10
mov esi, dword [esp + 0x1c]
cmp esi, dword [eax + 4]
jg 0x402120
jge 0x4022d0
movzx esi, byte [esp + 0x2c]
mov dword [0x428008], ebp
lea esi, [esi]
mov edx, dword [esp + 0x18]
add edx, dword [eax + 8]
mov ecx, dword [esp + 0x1c]
adc ecx, dword [eax + 0xc]
mov eax, esi
test al, al
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
je 0x401feb
jmp 0x4021b0
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x429107
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00401da0
mov eax, edi
call fcn.00401da0
jmp 0x401feb
mov eax, ebp
mov dword [esp + 0x20], ecx
call fcn.00401510
mov eax, dword [0x4350d8]
mov edx, dword [0x4350dc]
mov ecx, eax
mov ebx, edx
add ecx, 1
adc ebx, 0
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
cmp edx, ebx
mov dword [esp + 0x1c], ebx
jb 0x402203
jbe 0x4022c0
mov dword [esp + 0x20], ecx
call fcn.004014e0
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [0x435084], edi
movsx edi, cl
mov dword [0x4350d8], eax
mov eax, esi
mov dword [0x4350dc], edx
test al, al
je 0x401f71
mov eax, edi
call fcn.00401da0
jmp 0x401f71
cmp dword [esp + 0x18], eax
jae 0x401fc4
jmp 0x402048
cmp byte [0x435138], 0
movsx edi, cl
je 0x402012
jmp 0x402172
mov ebx, dword [esp + 0x18]
cmp ebx, dword [eax]
jae 0x4020dc
cmp dword [esp + 0x1c], ecx
jg 0x402150
jl 0x402286
mov ebx, dword [esp + 0x2c]
cmp dword [esp + 0x18], ebx
jae 0x402150
lea ecx, [ebp - 1]
cmp ecx, 1
mov dword [0x428008], ecx
jle 0x4022b0
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [ebx + edx - 0xc]
jl 0x402300
jg 0x4022b0
mov ecx, dword [esp + 0x18]
cmp ecx, dword [ebx + edx - 0x10]
jb 0x402300
nop
mov eax, dword [esp + 0x20]
add eax, edx
jmp 0x402150
cmp eax, dword [esp + 0x18]
jbe 0x402203
jmp 0x4021f6
mov esi, dword [esp + 0x18]
cmp esi, dword [eax]
jae 0x402120
jmp 0x402141
mov eax, dword [esp + 0x20]
mov dword [0x428008], ecx
shl ecx, 4
movzx esi, byte [esp + 0x2c]
add eax, ecx
jmp 0x402150
lea ecx, [ebp - 2]
cmp ecx, 1
mov edx, ecx
je 0x402340
mov ebp, dword [eax - 0x30]
mov ebx, dword [eax - 0x2c]
sub eax, 0x10
mov dword [esp + 0x2c], ecx
sub ecx, 1
cmp dword [esp + 0x1c], ebx
jl 0x402303
jle 0x402334
mov dword [0x428008], edx
mov edx, dword [esp + 0x2c]
shl edx, 4
jmp 0x4022b0
cmp dword [esp + 0x18], ebp
jb 0x402303
jmp 0x402322
mov eax, dword [esp + 0x20]
mov dword [0x428008], 1
add eax, 0x10
jmp 0x402150