Function at 0x408390
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [0x418114]
sub esp, 0x210
push ebx
push ebp
push esi
mov esi, ecx
mov dword [eax + 0x304], 1
mov ecx, dword [0x418114]
xor ebx, ebx
push edi
mov dword [ecx + 0x308], ebx
mov edx, dword [0x418114]
mov eax, dword [edx + 0x310]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
cmp dword [0x418110], ebx
je 0x4083da
mov dword [0x418110], ebx
mov eax, dword [0x418168]
cmp eax, 3
je 0x4083e9
cmp eax, 4
jne 0x408434
cmp dword [0x412d14], ebx
je 0x40842e
mov edx, dword [0x4166c0]
cmp edx, ebx
je 0x40842e
mov edi, str.exit_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ebx
je 0x40842e
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
mov ecx, dword [edx + 0xc]
push str.exit_n
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40842e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [0x417d0c], bl
mov ecx, dword [0x418114]
mov dword [0x4164b0], ebx
mov dword [0x417708], ebx
call fcn.00402c70
test eax, eax
je 0x4084f6
cmp byte [0x4131c2], bl
je 0x4084f6
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.MSVCRT.dll__ftime]
mov eax, dword [esp + 0x18]
mov edx, dword [0x413aa0]
sub eax, edx
mov ecx, dword [esp + 0x1c]
mov edi, dword [0x413aa4]
and ecx, 0xffff
lea eax, [eax + eax*4]
add esp, 4
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
sub eax, edi
add eax, ecx
mov ecx, dword [0x418128]
and ecx, 0x80000001
jns 0x4084ac
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x4084d0
mov ecx, dword [0x414c88]
mov edx, dword [0x414c80]
sub ecx, eax
push edx
mov dword [0x414c88], ecx
mov ecx, dword [0x418114]
call fcn.00402d80
jmp 0x4084ef
mov edx, dword [0x414c84]
mov ecx, dword [0x418114]
sub edx, eax
mov eax, dword [0x414c7c]
push eax
mov dword [0x414c84], edx
call fcn.00402ec0
mov ecx, esi
call fcn.004093d0
mov ecx, dword [0x418124]
mov eax, dword [0x418128]
cmp ecx, eax
jne 0x408599
mov eax, dword [esp + 0x228]
cmp eax, ebx
je 0x408599
cmp byte [eax], bl
jne 0x408575
mov eax, dword [esp + 0x224]
sub eax, ebx
je 0x408563
dec eax
je 0x408551
dec eax
je 0x40853f
mov eax, 0x412d18
lea edx, [esp + 0x20]
push eax
push 0x412e54
push edx
jmp 0x408580
mov eax, str.1_2_1_2
lea edx, [esp + 0x20]
push eax
push 0x412e54
push edx
jmp 0x408580
mov eax, 0x412228
lea edx, [esp + 0x20]
push eax
push 0x412e54
push edx
jmp 0x408580
mov eax, 0x412240
lea edx, [esp + 0x20]
push eax
push 0x412e54
push edx
jmp 0x408580
push eax
lea eax, [esp + 0x24]
push 0x412e54
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [0x418114]
call fcn.00403380
mov ebp, dword [0x418168]
mov al, byte [0x4131b9]
mov esi, ebp
mov dword [0x41814c], ebx
sub esi, 6
neg esi
sbb esi, esi
and esi, 2
add esi, 6
cmp al, bl
je 0x4085d0
mov dword [0x418168], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret 0xc
mov edx, dword [0x4166c0]
cmp edx, ebx
je 0x408626
cmp ebp, 1
je 0x4085ed
cmp ebp, 2
je 0x4085ed
cmp ebp, 5
je 0x4085ed
cmp ebp, ebx
jne 0x408626
mov edi, str.try_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ebx
je 0x408626
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
mov ecx, dword [edx + 0xc]
push str.try_n
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408620
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [0x418168]
mov edx, dword [0x415468]
cmp edx, ebx
je 0x408668
cmp ebp, 5
jne 0x408668
mov edi, str.try_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ebx
je 0x408668
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
mov ecx, dword [edx + 0xc]
push str.try_n
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408668
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x418168], esi
pop edi
pop esi
pop ebp
mov byte [0x418175], 1
pop ebx
add esp, 0x210
ret 0xc