Function at 0x401d80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
cmp dword [ebp + 8], 0
je 0x401dbe
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 1
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040cf70
add esp, 0x10
mov edx, dword [ebp + 8]
push edx
push 0xa
call fcn.0040bc10
add esp, 8
jmp 0x401df6
mov eax, dword [ebp + 0xc]
push eax
call fcn.004033a0
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x401ddd
mov ecx, dword [ebp - 0x10]
movsx edx, byte [ecx]
test edx, edx
jne 0x401df6
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00402bc0
add esp, 0xc
jmp 0x401fb2
cmp dword [ebp + 0x10], 0
jle 0x401fb2
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 0
jmp 0x401e26
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp + 0x10]
jge 0x401ef7
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0xc]
movzx ecx, byte [eax]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00418210
add esp, 4
test eax, eax
je 0x401ef2
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004182b0
add esp, 4
test eax, eax
je 0x401ec5
cmp dword [ebp - 0x18], 0
je 0x401e75
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
jmp 0x401ef7
cmp dword [ebp - 0x14], 0
je 0x401eba
mov edx, dword [ebp - 0xc]
add edx, 1
cmp edx, dword [ebp + 0x10]
jge 0x401e95
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 1]
mov dword [ebp - 0x20], ecx
jmp 0x401e9c
mov dword [ebp - 0x20], 0
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.00418230
add esp, 4
test eax, eax
je 0x401eba
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
jmp 0x401ef7
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x401ef2
cmp dword [ebp - 0x14], 0
je 0x401ee9
cmp dword [ebp - 0xc], 1
jne 0x401ee1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
jmp 0x401ee9
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
jmp 0x401ef7
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
jmp 0x401e1d
cmp dword [ebp + 8], 0
je 0x401f33
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 0x28]
jne 0x401f0d
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x10]
je 0x401f31
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
push edx
push 1
mov eax, dword [ebp + 0xc]
push eax
call fcn.0040cf70
add esp, 0x10
mov ecx, dword [ebp + 8]
push ecx
push 0xa
call fcn.0040bc10
add esp, 8
jmp 0x401f9b
cmp dword [ebp - 8], 1
jle 0x401f80
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 8]
mov al, byte [edx]
mov byte [ebp - 1], al
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 8]
mov byte [ecx], 0
mov edx, dword [ebp + 0xc]
push edx
call fcn.004033a0
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x401f73
mov eax, dword [ebp + 0xc]
push eax
push 0x461724
call fcn.00402a60
add esp, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 8]
mov dl, byte [ebp - 1]
mov byte [ecx], dl
jmp 0x401f87
mov dword [ebp - 0x10], 0x46270e
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00402bc0
add esp, 0xc
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 8]
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp - 8]
mov dword [ebp + 0x10], ecx
jmp 0x401df6
mov esp, ebp
pop ebp
ret