Function at 0x497110
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e2720
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x410
push ebx
mov eax, 0x3c
push esi
mov word [ebp - 0x21c], ax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x11], 0
mov byte [ebp - 0x12], 0
mov dword [ebp - 4], 0
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x497154
lea edi, [ebp - 0x21c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x497164
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x21c]
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x497185
mov ecx, dword [ebp + 0x10]
sub eax, edx
mov edi, eax
mov dword [ebp - 0x18], edi
lea edx, [ebp - 0x41c]
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x4971a0
lea eax, [ebp - 0x41c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4971b3
mov ecx, dword [ebp + 8]
sub eax, edx
push 0x5f6698
push ecx
mov dword [ebp + 0x10], eax
call dword [sym.imp.msvcrt.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x497203
push 0x637c4c
lea edx, [ebp - 0x1c]
push edx
mov dword [ebp - 0x1c], 0xff67697f
call sub.msvcrt.dll__CxxThrowException
mov eax, 0x4971f2
ret
mov esi, dword [ebp + 0x18]
mov al, byte [esi]
test al, al
je 0x497346
cmp byte [ebp - 0x11], 0
je 0x4972ea
cmp al, 0x3e
jne 0x497233
movsx eax, al
push ebx
push eax
mov byte [ebp - 0x11], 0
inc esi
call dword [sym.imp.msvcrt.dll_fputc]
add esp, 8
jmp 0x497206
cmp byte [ebp - 0x12], 0
je 0x497332
movsx eax, al
push eax
call dword [sym.imp.msvcrt.dll_isspace]
add esp, 4
test eax, eax
je 0x497332
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x41c]
push edx
lea eax, [esi + 1]
push eax
call dword [sym.imp.msvcrt.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x497332
mov edi, dword [ebp + 0x10]
push ebx
push 1
inc edi
push edi
push esi
call dword [sym.imp.msvcrt.dll_fwrite]
mov al, byte [esi + edi]
add esi, edi
add esp, 0x10
cmp al, 0x20
je 0x497295
cmp al, 0x3d
jne 0x49732f
mov al, byte [esi]
test al, al
je 0x49732f
cmp al, 0x22
je 0x4972b4
movsx eax, al
push ebx
push eax
inc esi
call dword [sym.imp.msvcrt.dll_fputc]
add esp, 8
jmp 0x497295
cmp byte [esi], 0
je 0x49732f
push ebx
push 0x22
call dword [sym.imp.msvcrt.dll_fputc]
mov ecx, dword [ebp + 0x14]
push ebx
push ecx
inc esi
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 0x10
mov al, byte [esi]
test al, al
je 0x4972de
cmp al, 0x22
je 0x4972de
inc esi
jmp 0x4972d1
mov edi, dword [ebp - 0x18]
mov byte [ebp - 0x12], 0
jmp 0x497206
push edi
lea edx, [ebp - 0x21c]
push edx
push esi
call dword [sym.imp.msvcrt.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x497332
movsx eax, byte [esi + edi]
push eax
call dword [sym.imp.msvcrt.dll_isspace]
add esp, 4
test eax, eax
je 0x497332
push ebx
push 1
push edi
push esi
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
add esi, edi
mov byte [ebp - 0x11], 1
mov byte [ebp - 0x12], 1
jmp 0x497206
mov edi, dword [ebp - 0x18]
movsx eax, byte [esi]
push ebx
push eax
inc esi
call dword [sym.imp.msvcrt.dll_fputc]
add esp, 8
jmp 0x497206
push ebx
call dword [sym.imp.msvcrt.dll_fclose]
mov ecx, dword [ebp - 0xc]
add esp, 4
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret