Function at 0x4050d4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push edi
push esi
push ebx
cmp dword [0x40e088], 0
je case.0x405241.38
cmp dword [0x40e08c], 0
jne 0x4050f9
mov dword [0x40e08c], 1
cmp dword [0x40e07c], 0
jne 0x40510c
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [0x40e07c], eax
cmp dword [0x40e080], 0
jne 0x405122
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [0x40e080], eax
mov ecx, dword [section..bss]
mov edx, dword [0x40e07c]
test ecx, ecx
je 0x405140
push edx
push ecx
call fcn.004060d0
jmp 0x405150
push 0x4000
push edx
call fcn.0040600c
mov dword [section..bss], eax
add esp, 8
call fcn.00405fa4
mov dword [0x40e088], 0
mov esi, dword [0x40e084]
mov al, byte [0x40f010]
mov byte [esi], al
mov dword [ebp - 4], esi
mov ebx, dword [0x40e08c]
lea ecx, [ebx*2]
nop
movzx eax, byte [esi]
mov dl, byte [eax + 0x4040e0]
cmp word [ecx + 0x403e80], 0
je 0x40519f
mov dword [0x40f030], ebx
mov dword [0x40f040], esi
movsx eax, word [ecx + 0x404220]
movzx edx, dl
jmp 0x4051d4
movsx ebx, word [ecx + 0x404480]
cmp ebx, 0x129
jle 0x4051c6
movzx edx, byte [edi + 0x4041e0]
lea ecx, [ebx*2]
movsx eax, word [ecx + 0x404220]
mov edi, edx
add eax, edx
movsx eax, word [eax*2 + 0x404b80]
cmp eax, ebx
jne 0x4051b0
movsx eax, word [ecx + 0x404220]
add eax, edx
movsx ebx, word [eax*2 + 0x4046e0]
inc esi
lea eax, [ebx*2]
mov ecx, eax
cmp word [ecx + 0x404220], 0x20e
jne 0x405180
movsx edx, word [ebx*2 + 0x403e80]
mov eax, dword [ebp - 4]
mov dword [0x40f100], eax
mov eax, esi
sub eax, dword [ebp - 4]
mov dword [0x40f0f0], eax
mov al, byte [esi]
mov byte [0x40f010], al
mov byte [esi], 0
mov dword [0x40e084], esi
cmp edx, 0x2f
ja case.default.0x405241
jmp dword [edx*4 + 0x405263]
push 0x405020
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call sub.msvcrt.dll_fprintf
add esp, 8
jmp case.0x405241.38
mov al, byte [0x40f010]
mov byte [esi], al
mov esi, dword [0x40f040]
mov ebx, dword [0x40f030]
jmp 0x40520e
cmp dword [0x40f210], 0
jne 0x405358
mov dword [0x40e08c], 3
jmp case.0x405241.38
push 0x405008
call fcn.00409e1c
add esp, 4
jmp case.0x405241.38
mov dword [0x40e08c], 1
jmp case.0x405241.38
inc dword [0x40f310]
mov dword [0x40e08c], 1
mov eax, 0x102
jmp 0x405920
mov eax, 0x10c
jmp 0x405920
mov eax, 0x10d
jmp 0x405920
mov eax, 0x10e
jmp 0x405920
mov eax, 0x10f
jmp 0x405920
mov eax, 0x110
jmp 0x405920
mov eax, 0x111
jmp 0x405920
mov eax, 0x112
jmp 0x405920
mov eax, 0x113
jmp 0x405920
mov eax, 0x114
jmp 0x405920
mov eax, 0x116
jmp 0x405920
mov eax, 0x117
jmp 0x405920
mov eax, 0x118
jmp 0x405920
mov eax, 0x119
jmp 0x405920
mov eax, 0x115
jmp 0x405920
mov eax, 0x11a
jmp 0x405920
mov eax, 0x11c
jmp 0x405920
mov eax, 0x11b
jmp 0x405920
mov eax, 0x11e
jmp 0x405920
mov eax, 0x11f
jmp 0x405920
mov eax, 0x120
jmp 0x405920
mov eax, 0x11d
jmp 0x405920
mov eax, 0x103
jmp 0x405920
mov eax, 0x104
jmp 0x405920
mov eax, 0x105
jmp 0x405920
mov edx, dword [0x40f100]
mov al, byte [edx]
mov byte [0x40f0e0], al
movzx eax, byte [edx]
jmp 0x405920
mov eax, dword [0x40f100]
mov al, byte [eax]
mov byte [0x40f0e0], al
mov eax, 0x109
jmp 0x405920
mov byte [0x40f0e0], 0x3d
mov al, byte [0x40f010]
mov byte [esi], al
mov esi, dword [ebp - 4]
inc esi
mov dword [0x40e084], esi
mov eax, dword [ebp - 4]
mov dword [0x40f100], eax
mov eax, esi
sub eax, dword [ebp - 4]
mov dword [0x40f0f0], eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 1]
mov byte [0x40f010], al
mov eax, dword [ebp - 4]
mov byte [eax + 1], 0
mov dword [0x40e084], esi
mov eax, 0x109
jmp 0x405920
push dword [0x40f100]
call fcn.00408d80
mov dword [0x40f0e0], eax
mov eax, 0x10a
jmp 0x405920
mov eax, dword [0x40f100]
mov al, byte [eax]
mov byte [0x40f0e0], al
mov eax, 0x10b
jmp 0x405920
inc dword [0x40f310]
mov eax, 0x102
jmp 0x405920
inc dword [0x40f310]
jmp case.0x405241.38
cmp edx, 0xa
jne 0x4055fc
inc dword [0x40f310]
cmp edx, 0xffffffff
je 0x405248
jmp case.0x405241.39
cmp edx, 0xffffffff
je 0x405623
cmp edx, 0xa
jne case.0x405241.39
inc dword [0x40f310]
call fcn.00405e24
mov edx, eax
cmp edx, 0x2a
jne 0x405607
cmp edx, 0x2a
jne 0x4055fc
call fcn.00405e24
mov edx, eax
cmp edx, 0x2a
je 0x405628
cmp edx, 0x2f
jne 0x4055f1
jmp case.0x405241.38
push dword [0x40f100]
call fcn.00408d80
mov dword [0x40f0e0], eax
mov eax, 0x107
jmp 0x405920
xor ebx, ebx
push dword [0x40f100]
call fcn.00408d80
mov dword [0x40f0e0], eax
mov edx, dword [0x40f100]
add esp, 4
jmp 0x405694
cmp cl, 0xa
jne 0x40568d
inc dword [0x40f310]
mov cl, byte [edx]
cmp cl, 0x22
jne 0x405693
inc ebx
inc edx
mov cl, byte [edx]
test cl, cl
jne 0x405680
cmp ebx, 2
je 0x4056a9
push 0x40503f
call fcn.00409e1c
mov eax, 0x106
jmp 0x405920
mov ebx, dword [0x40f100]
mov edi, ebx
xor eax, eax
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edx, [ecx - 1]
cmp byte [ebx + edx - 1], 0x2e
jne 0x4056dc
mov byte [ebx + edx - 1], 0
mov ebx, dword [0x40f100]
mov ecx, ebx
mov edx, ecx
cmp byte [edx], 0x30
jne 0x4056eb
inc edx
cmp byte [edx], 0x30
je 0x4056e5
mov bl, byte [edx]
test bl, bl
jne 0x4056f4
dec edx
jmp 0x405708
cmp bl, 0x5c
jne 0x405704
add edx, 2
inc dword [0x40f310]
jmp 0x405708
mov byte [ecx], bl
inc edx
inc ecx
mov bl, byte [edx]
test bl, bl
jne 0x4056f4
mov byte [ecx], 0
push dword [0x40f100]
call fcn.00408d80
mov dword [0x40f0e0], eax
mov eax, 0x108
jmp 0x405920
mov ecx, dword [0x40f100]
mov dl, byte [ecx]
cmp dl, 0x1f
ja 0x405750
movzx eax, dl
add eax, 0x40
push eax
push 0x405058
jmp 0x405766
cmp dl, 0x7e
jbe 0x405760
movzx eax, byte [ecx]
push eax
push 0x40506f
jmp 0x405766
push ecx
push 0x405087
call fcn.00409e1c
add esp, 8
jmp case.0x405241.38
push dword [0x40e080]
push 1
push dword [0x40f0f0]
push dword [0x40f100]
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp case.0x405241.38
xor eax, eax
jmp 0x405920
mov eax, esi
sub eax, dword [0x40f100]
lea ebx, [eax - 1]
mov al, byte [0x40f010]
mov byte [esi], al
mov edx, dword [section..bss]
mov eax, dword [0x40f020]
add eax, dword [edx + 4]
cmp dword [0x40e084], eax
ja 0x405810
add ebx, dword [0x40f100]
mov dword [0x40e084], ebx
call fcn.00405b6c
mov ebx, eax
push ebx
call fcn.00405c34
mov edx, eax
mov eax, dword [0x40f100]
mov dword [ebp - 4], eax
add esp, 4
test edx, edx
je 0x40520e
mov eax, dword [0x40e084]
mov dword [ebp - 0x14], eax
inc eax
mov dword [0x40e084], eax
mov esi, dword [ebp - 0x14]
inc esi
mov ebx, edx
jmp 0x405178
call fcn.004059cc
mov edx, eax
cmp edx, 1
je 0x405835
jg 0x405827
test edx, edx
je 0x4058a0
jmp case.0x405241.38
cmp edx, 2
je 0x4058c6
jmp case.0x405241.38
mov dword [0x40f050], 0
call fcn.00406108
test eax, eax
je 0x405870
mov eax, dword [0x40f100]
mov dword [0x40e084], eax
mov edx, dword [0x40e08c]
dec edx
mov eax, edx
shr eax, 0x1f
add edx, eax
sar edx, 1
add edx, 0x2e
jmp 0x405238
cmp dword [0x40f050], 0
jne case.0x405241.38
push dword [0x40e07c]
push dword [section..bss]
call fcn.004060d0
call fcn.00405fa4
add esp, 8
jmp case.0x405241.38
add ebx, dword [0x40f100]
mov dword [0x40e084], ebx
call fcn.00405b6c
mov ebx, eax
mov esi, dword [0x40e084]
mov eax, dword [0x40f100]
mov dword [ebp - 4], eax
jmp 0x405178
mov edx, dword [section..bss]
mov eax, dword [0x40f020]
add eax, dword [edx + 4]
mov dword [0x40e084], eax
call fcn.00405b6c
mov ebx, eax
mov esi, dword [0x40e084]
mov eax, dword [0x40f100]
mov dword [ebp - 4], eax
jmp 0x40520e
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x4050a0
call sub.msvcrt.dll_fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0xa
call sub.msvcrt.dll_putc
push 1
call sub.msvcrt.dll_exit
lea esi, [esi]
lea esp, [ebp - 0x3c]
pop ebx
pop esi
pop edi
leave
ret