Function at 0x401dcc
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [0x40e148]
test ebx, ebx
mov edi, eax
mov ebp, edx
je 0x401f7c
xor eax, eax
mov edx, dword [0x40e268]
cmp dword [esp + 0x30], 0x3a
sete al
test edx, edx
je 0x401dfc
xor eax, 1
mov ecx, dword [0x40e138]
test ecx, ecx
je 0x401e8c
xor esi, esi
test edx, edx
jne 0x401f6b
cmp dword [esp + 0x30], 0x3a
je 0x402102
test esi, esi
jne 0x40210a
mov edx, dword [0x40b0b0]
cmp dword [esp + 0x30], 0x3a
mov dword [esp + 0x14], edx
je 0x40211f
mov edx, dword [section..data]
mov dword [esp + 0x10], edx
test ebx, ebx
jne 0x401ea0
test ecx, ecx
jne 0x401f44
test ebx, ebx
jne 0x401e5e
cmp ebp, edi
ja 0x4021b7
mov edi, dword [sym.imp.msvcrt.dll__iob]
test byte [edi + 0x2c], 0x20
jne 0x401fb3
mov dword [0x40e338], ebp
mov ebp, dword [0x40e308]
test ebp, ebp
jne 0x401f96
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
test ebx, ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
je 0x401e4a
test eax, eax
je 0x401e4a
test ebx, ebx
jne 0x401fe0
mov eax, dword [esp + 0x10]
cmp byte [eax], 0
jne 0x401fe0
lea esi, [esi]
xor ecx, ecx
cmp ebp, edi
mov dword [esp], edi
jbe 0x401ed8
movsx eax, byte [ebp - 1]
movzx esi, byte [0x40e6a8]
cmp eax, esi
je 0x40226c
mov esi, ebp
sub esi, ecx
xor edx, edx
cmp esi, edi
jbe 0x401ef1
mov eax, ecx
neg eax
cmp byte [eax + ebp - 1], 0xd
je 0x402273
lea esi, [ecx + edx]
mov edx, ebp
sub edx, esi
mov esi, edx
sub esi, edi
je 0x401f39
mov eax, dword [esp + 0x14]
cmp byte [eax], 0
jne 0x402254
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add ebx, 0x20
push ebx
push esi
push 1
push edi
call sub.msvcrt.dll_fwrite
add edi, esi
add esp, 0x10
mov dword [esp], edi
mov edx, dword [esp + 0x14]
cmp byte [edx], 0
jne 0x40223c
mov ebx, dword [0x40e148]
mov edi, dword [esp]
jmp 0x401e52
mov edx, dword [esp + 0x14]
cmp byte [edx], 0
jne 0x401f5a
mov ecx, dword [esp + 0x10]
cmp byte [ecx], 0
je 0x401e52
test eax, eax
je 0x401ebc
test ebx, ebx
jne 0x401fe0
jmp 0x401eac
test ecx, ecx
jns 0x401e14
mov si, 1
jmp 0x401e14
sub esp, 0xc
push dword [esp + 0x3c]
call fcn.00401744
add esp, 0x10
mov ebx, dword [0x40e148]
jmp 0x401de5
mov edx, dword [sym.imp.msvcrt.dll__iob]
sub esp, 0xc
add edx, 0x20
push edx
call sub.msvcrt.dll_fflush
add esp, 0x10
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push str.writing_output
call dword [sym.imp.libintl3.dll_libintl_gettext]
add esp, 0xc
push eax
sub esp, 8
call sub.msvcrt.dll__errno
pop edx
pop ecx
push dword [eax]
push 0
call fcn.004072c8
add esp, 0x10
jmp 0x401e6e
mov ebx, dword [0x40e6b8]
test ebx, ebx
mov esi, edi
mov dword [esp + 0xc], 0
jne 0x4021d6
mov dword [esp + 8], 0
mov dword [esp + 4], edi
jmp 0x402022
mov edx, dword [esp + 0xc]
test edx, edx
mov dword [esp + 0x18], 1
je 0x402169
mov esi, ebx
add esi, dword [esp + 0x18]
cmp ebp, esi
jbe 0x402212
mov edx, esi
sub edx, edi
add edx, dword [esp + 4]
push edx
lea eax, [esp + 0x1c]
mov ebx, ebp
push eax
sub ebx, edi
push ebx
push dword [esp + 0x10]
call fcn.00404d78
add esp, 0x10
cmp eax, 0xffffffff
je 0x402212
lea ebx, [edi + eax]
cmp ebx, ebp
je 0x402212
mov eax, dword [esp + 0x18]
test eax, eax
je 0x402008
mov ecx, dword [0x40e148]
test ecx, ecx
je 0x402130
sub esp, 0xc
cmp dword [0x40e268], 1
sbb esi, esi
and esi, 0xd
add esi, 0x2d
push esi
mov edx, ebp
mov eax, ebx
call fcn.00401744
mov esi, dword [0x40e138]
add esp, 0x10
test esi, esi
je 0x4020a9
mov edx, dword [esp + 0x10]
cmp byte [edx], 0
jne 0x402187
mov edx, dword [sym.imp.msvcrt.dll__iob]
add edx, 0x20
push edx
push dword [esp + 0x1c]
push 1
push ebx
call sub.msvcrt.dll_fwrite
mov eax, dword [0x40e138]
add esp, 0x10
test eax, eax
je 0x4020d8
mov eax, dword [esp + 0x10]
cmp byte [eax], 0
jne 0x40219f
mov ecx, dword [0x40e148]
test ecx, ecx
je 0x40201c
mov esi, dword [sym.imp.msvcrt.dll__iob]
sub esp, 8
add esi, 0x20
push esi
push 0xa
call sub.msvcrt.dll_fputc
add esp, 0x10
jmp 0x40201c
test esi, esi
jne 0x401e27
mov edx, dword [0x40b0b4]
cmp dword [esp + 0x30], 0x3a
mov dword [esp + 0x14], edx
jne 0x401e3c
mov edx, dword [str.01_31]
mov dword [esp + 0x10], edx
jmp 0x401e46
mov eax, dword [esp + 0x14]
cmp byte [eax], 0
jne 0x402172
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40214d
mov esi, dword [esp + 0xc]
mov dword [esp + 0xc], 0
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x20
mov edx, ebx
push ecx
sub edx, esi
push edx
push 1
push esi
call sub.msvcrt.dll_fwrite
jmp 0x40208f
mov dword [esp + 0xc], esi
jmp 0x40201c
sub esp, 8
push eax
push dword [0x40b0cc]
call dword [sym.imp.libintl3.dll_libintl_printf]
add esp, 0x10
jmp 0x402139
sub esp, 8
push edx
push dword [0x40b0cc]
call dword [sym.imp.libintl3.dll_libintl_printf]
add esp, 0x10
jmp 0x4020a9
sub esp, 8
push eax
push dword [0x40b0c8]
call dword [sym.imp.libintl3.dll_libintl_printf]
add esp, 0x10
jmp 0x4020d8
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x20
mov eax, ebp
push ecx
sub eax, edi
push eax
push 1
push edi
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x401e5e
mov ebx, ebp
sub esp, 0xc
sub ebx, edi
push ebx
call fcn.00406ad4
add esp, 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], eax
jmp 0x402207
sub esp, 0xc
movsx ecx, byte [ebx + edi]
push ecx
call sub.msvcrt.dll_tolower
add esp, 0x10
mov edx, dword [esp + 8]
mov byte [ebx + edx], al
dec ebx
jns 0x4021f0
cmp ebp, esi
ja 0x40202a
mov edi, dword [esp + 8]
test edi, edi
je 0x402229
sub esp, 0xc
push dword [esp + 0x14]
call sub.msvcrt.dll_free
add esp, 0x10
mov ebx, dword [0x40e148]
test ebx, ebx
je 0x40227a
mov esi, ebp
mov edi, esi
jmp 0x401ebc
sub esp, 8
push edx
push dword [0x40b0c8]
call dword [sym.imp.libintl3.dll_libintl_printf]
add esp, 0x10
jmp 0x401f33
sub esp, 8
push eax
push dword [0x40b0cc]
call dword [sym.imp.libintl3.dll_libintl_printf]
add esp, 0x10
jmp 0x401f0b
mov cl, 1
jmp 0x401ed8
mov dl, 1
jmp 0x401ef1
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x402235
mov esi, dword [esp + 0xc]
mov edi, esi
jmp 0x401ebc