Function at 0x406b60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push esi
push edi
push 0
call ebx
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0xc], eax
je 0x406d25
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff6
call esi
test eax, eax
jne 0x406b9b
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0xfffffffffffffff6
call esi
push 0xfffffffffffffff5
mov dword [ebp - 8], eax
call esi
test eax, eax
jne 0x406bb0
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0xfffffffffffffff5
call esi
push 0
mov edi, eax
call ebx
xor ebx, ebx
cmp dword [ebp - 8], 0xffffffff
je 0x406ceb
cmp edi, 0xffffffff
je 0x406ceb
mov esi, dword [ebp + 8]
push 0x104
push esi
push 0x31
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
push esi
push esi
call dword [sym.imp.USER32.dll_CharToOemA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
push esi
push edi
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x406c12
push eax
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
push edx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 8]
lea ecx, [ebp - 4]
push ecx
push 1
lea edx, [ebp - 0x24]
push edx
push eax
mov byte [esi], bl
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
test eax, eax
je 0x406ceb
cmp word [ebp - 0x24], 1
jne 0x406ccf
cmp dword [ebp - 0x20], 0
je 0x406ccf
mov ax, word [ebp - 0x1a]
cmp ax, 0xd
je 0x406cf4
cmp ebx, 0x103
jge 0x406ccf
cmp ax, 0x1b
je 0x406ccf
cmp ax, 9
je 0x406ccf
cmp ax, 8
jne 0x406cae
test ebx, ebx
jle 0x406ccf
push 0
lea ecx, [ebp - 4]
push ecx
push 1
lea edx, [ebp - 0x16]
push edx
push edi
dec ebx
call fcn.00403b80
push 0
lea eax, [ebp - 4]
push eax
push 1
push 0x40c310
push edi
call fcn.00403b80
push 0
lea ecx, [ebp - 4]
push ecx
push 1
lea edx, [ebp - 0x16]
push edx
push edi
call fcn.00403b80
add esp, 0x3c
jmp 0x406ccf
mov al, byte [ebp - 0x16]
test al, al
je 0x406ccf
mov byte [ebx + esi], al
push 0
lea eax, [ebp - 4]
push eax
push 1
push 0x40c30c
push edi
inc ebx
call fcn.00403b80
add esp, 0x14
mov eax, dword [ebp - 8]
lea ecx, [ebp - 4]
push ecx
push 1
lea edx, [ebp - 0x24]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
test eax, eax
jne 0x406c30
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 4]
push ecx
push 1
push 0x40c244
push edi
mov byte [ebx + esi], 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x406d48
push eax
lea edx, [ebp - 4]
push edx
push 1
push 0x40c244
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x406d48
mov esi, dword [ebp + 8]
push 0
push 0x406a10
push 0
push 0x83
push eax
mov dword [0x4120d0], esi
call dword [sym.imp.USER32.dll_DialogBoxParamA]
cmp eax, 1
jne 0x406ceb
lea eax, [ebp - 0x8c]
push eax
call fcn.004028e0
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 4
push esi
call edi
push eax
lea ecx, [ebp - 0x8c]
push esi
push ecx
call fcn.00403310
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x8c]
push eax
call fcn.004033c0
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x34]
mov ebx, eax
add esp, 0x14
mov ecx, 0x10
sub edx, ebx
mov ebx, dword [edx + eax]
cmp ebx, dword [eax]
jne 0x406dae
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x406d90
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
push 0x104
push esi
push 0x41
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
cmp dword [ebp + 0x10], 0
je 0x406e17
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
call ebx
test eax, eax
jne 0x406dde
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0xfffffffffffffff5
call ebx
push esi
push esi
mov ebx, eax
call dword [sym.imp.USER32.dll_CharToOemA]
push esi
call edi
push 0
lea edx, [ebp - 4]
push edx
mov edi, eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x406e2c
push eax
lea eax, [ebp - 4]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x10
push 0x40c300
push esi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret