Function at 0x402070
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3ac
movzx ebp, byte [0x40a02b]
mov eax, ebp
test al, al
jne 0x402230
lea edi, [esp + 0x120]
xor eax, eax
mov ecx, 0xa0
mov byte [esp + 0x58], 0
rep stosd dword es:[edi], eax
lea ebx, [esp + 0x120]
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x20
mov dword [esp], ebx
call dword [0x40a05c]
sub esp, 0xc
test eax, eax
je 0x40221a
mov edx, dword [esp + 0x34]
test edx, edx
je 0x40221a
cmp eax, 3
sete al
xor esi, esi
mov ebp, eax
lea esi, [esi]
movzx eax, word [ebx]
cmp ax, 1
je 0x402320
cmp ax, 4
jne 0x4022a8
mov eax, dword [0x405020]
test eax, eax
js 0x40217d
movsx eax, word [ebx + 6]
lea edi, [esp + 0x58]
mov dword [esp + 0xc], eax
movsx eax, word [ebx + 4]
mov dword [esp + 4], str.input:_WindowBufferSize___i__i__n
mov dword [esp + 8], eax
mov dword [esp], edi
call sub.cygwin1.dll_sprintf
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x402136
mov ecx, eax
mov dword [esp + 4], edi
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
mov ecx, eax
add cl, al
mov eax, dword [0x405020]
sbb edx, 3
sub edx, edi
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.cygwin1.dll_write
lea ecx, [esp + 0x44]
lea edx, [esp + 0x42]
xor edi, edi
xor eax, eax
sub edx, ecx
mov dword [esp + 0x38], 0
mov dword [esp + 0x42], 0
add edx, 0x16
mov dword [esp + 0x54], 0
and edx, 0xfffffffc
mov dword [ecx + eax], edi
add eax, 4
cmp eax, edx
jb 0x4021a9
mov dword [esp], 0xfffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 4
lea edi, [esp + 0x42]
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
sub esp, 8
test eax, eax
jne 0x402240
mov eax, dword [0x405020]
mov dword [esp + 8], 0x24
mov dword [esp + 4], str.input:_query_console_size_failed____n
mov dword [esp], eax
mov dword [esp + 0x38], 0x500019
mov dword [esp + 0x3c], 0x7d00f0
call sub.cygwin1.dll_write
mov edx, dword [esp + 0x34]
add esi, 1
add ebx, 0x14
cmp esi, edx
jb 0x4020f0
add esp, 0x3ac
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 0x3ac
xor ebp, ebp
pop ebx
mov eax, ebp
pop esi
pop edi
pop ebp
ret
movzx eax, word [esp + 0x52]
movzx edx, word [esp + 0x42]
add eax, 1
sub ax, word [esp + 0x4e]
mov word [esp + 0x3a], dx
lea edx, [edx + edx*2]
mov word [esp + 0x38], ax
lea eax, [eax + eax*4]
mov word [esp + 0x3e], ax
mov eax, dword [0x405018]
mov word [esp + 0x3c], dx
test eax, eax
jns 0x4025b0
mov eax, dword [0x405020]
test eax, eax
jns 0x402590
mov eax, dword [0x405014]
test eax, eax
js 0x402208
lea edx, [esp + 0x38]
call fcn.004014f0
jmp 0x402208
mov ecx, dword [0x405020]
test ecx, ecx
js 0x40220c
lea edi, [esp + 0x58]
mov dword [esp + 8], eax
mov dword [esp + 4], str.input:_event__u_received_n
mov dword [esp], edi
call sub.cygwin1.dll_sprintf
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4022d0
mov ecx, eax
mov dword [esp + 4], edi
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
mov ecx, eax
add cl, al
mov eax, dword [0x405020]
sbb edx, 3
sub edx, edi
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.cygwin1.dll_write
jmp 0x402208
mov eax, dword [ebx + 4]
test eax, eax
jne 0x402370
mov edi, dword [0x405020]
test edi, edi
js 0x40220c
movzx eax, word [ebx + 0xa]
lea edi, [esp + 0x58]
mov dword [esp + 4], str.input:_KeyUp_u_skipped_n
mov dword [esp], edi
mov dword [esp + 8], eax
call sub.cygwin1.dll_sprintf
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x402353
jmp 0x4022e6
movzx eax, word [ebx + 0xa]
mov ecx, eax
and ecx, 0xffffffbf
cmp cx, 0x20
je 0x4024d0
cmp ax, 0x32
je 0x4024d0
cmp word [ebx + 0xe], 0
je 0x40220c
lea eax, [esp + 0x42]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], eax
lea eax, [esi + esi*4]
lea eax, [esp + eax*4 + 0x12e]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 4
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
sub esp, 0x20
mov dword [esp + 0x2c], eax
test eax, eax
jle 0x402208
mov ecx, dword [0x405020]
mov byte [esp + eax + 0x42], 0
test ecx, ecx
js 0x402466
lea eax, [esp + 0x42]
lea edi, [esp + 0x58]
mov dword [esp + 4], str.input:___s_
mov dword [esp + 8], eax
mov dword [esp], edi
call sub.cygwin1.dll_sprintf
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x40241f
mov ecx, eax
mov dword [esp + 4], edi
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
mov ecx, eax
add cl, al
mov eax, dword [0x405020]
sbb edx, 3
sub edx, edi
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.cygwin1.dll_write
lea eax, [esp + 0x42]
mov edi, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [0x405018]
mov dword [esp + 8], edi
mov dword [esp], eax
call sub.cygwin1.dll_write
mov edx, dword [0x405020]
test edx, edx
js 0x402208
mov dword [esp + 0xc], edi
lea edi, [esp + 0x58]
mov dword [esp + 8], eax
mov dword [esp + 4], str._written__i_of__i_bytes_n
mov dword [esp], edi
call sub.cygwin1.dll_sprintf
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4024af
jmp 0x4022e6
test byte [ebx + 0x10], 0xc
je 0x40238d
mov eax, dword [0x405020]
mov byte [esp + 0x42], 0
test eax, eax
js 0x402522
lea edx, [esp + 0x58]
mov dword [esp], eax
mov ecx, 0x60
mov dword [esp + 8], 0xd
mov dword [esp + 4], edx
mov dword [esp + 0x58], 0x75706e69
mov dword [esp + 0x5c], 0x60203a74
mov dword [esp + 0x60], 0x3030785c
mov word [esp + 0x64], cx
call sub.cygwin1.dll_write
lea eax, [esp + 0x42]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [0x405018]
mov dword [esp], eax
call sub.cygwin1.dll_write
mov edi, dword [0x405020]
test edi, edi
js 0x402208
lea edi, [esp + 0x58]
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], str._written__i_of__i_bytes_n
mov dword [esp], edi
call sub.cygwin1.dll_sprintf
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x40256f
jmp 0x4022e6
mov dword [esp + 8], 0x16
mov dword [esp + 4], str.input:_invalid_pty_fd_n
mov dword [esp], eax
call sub.cygwin1.dll_write
jmp 0x402286
lea edx, [esp + 0x38]
call fcn.004014f0
mov eax, dword [0x405014]
test eax, eax
js 0x402208
jmp 0x402293