Function at 0x401040
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58c
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
mov eax, dword [esi]
dec ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], eax
je 0x401179
mov eax, dword [esi + 4]
add esi, 4
mov cl, byte [eax]
cmp cl, 0x2f
je 0x40108f
cmp cl, 0x2d
jne 0x4011c6
movsx ecx, byte [eax + 1]
push ecx
call dword [0x402078]
add eax, 0xffffffc1
add esp, 4
cmp eax, 0x38
ja case.0x4010b1.77
xor edx, edx
mov dl, byte [eax + 0x401780]
jmp dword [edx*4 + 0x401744]
mov eax, dword [ebp - 4]
or al, 2
mov dword [ebp - 4], eax
jmp 0x40116f
or edi, 2
jmp 0x40116f
mov eax, dword [ebp - 4]
or al, 4
mov dword [ebp - 4], eax
jmp 0x40116f
or edi, 4
jmp 0x40116f
mov eax, dword [ebp - 4]
or al, 1
mov dword [ebp - 4], eax
jmp 0x40116f
or edi, 1
jmp 0x40116f
mov eax, dword [ebp - 0x20]
or al, 2
mov dword [ebp - 0x20], eax
jmp 0x40116f
mov eax, dword [ebp - 0x18]
or al, 2
mov dword [ebp - 0x18], eax
jmp 0x40116f
mov eax, dword [ebp - 0x20]
or al, 1
mov dword [ebp - 0x20], eax
jmp 0x40116f
mov eax, dword [ebp - 0x18]
or al, 1
mov dword [ebp - 0x18], eax
jmp 0x40116f
mov eax, dword [esi + 4]
test eax, eax
je 0x401150
cmp byte [eax], 0x2d
je 0x401150
mov eax, dword [esi + 4]
add esi, 4
push eax
call dword [0x402074]
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
add esp, 4
shr ecx, 0x1f
add edx, ecx
mov dword [ebp - 0x10], edx
jmp 0x40116e
mov dword [ebp - 0x10], 0
jmp 0x40116f
mov dword [0x403620], 1
jmp 0x40116f
mov edx, dword [esi + 4]
add esi, 4
mov dword [ebp - 0xc], edx
dec ebx
dec ebx
jne 0x401079
mov dword [ebp - 8], edi
call dword [0x402058]
mov esi, eax
call dword [0x4020ac]
test eax, eax
je 0x401252
cmp eax, 0xffffffff
je 0x401252
lea ecx, [ebp - 0x24]
lea edx, [ebp - 0x488]
push ecx
push 0x400
push edx
push 2
push eax
call dword [0x4020b0]
test eax, eax
jne 0x40121d
call dword [0x402054]
push eax
push str.GetUserObjectInfoformation_hWinSta__failed___d__n
jmp 0x40125e
mov eax, dword [esi]
mov dword [ebp - 8], edi
push eax
push str.wintty_argument__s_not_understood__use____for_help._n_n
call dword [0x402070]
add esp, 8
push 1
call dword [0x40206c]
mov ecx, dword [ebp - 0x14]
mov edx, dword [str._nwintty:_a_utility_for_echoing_the_stdin_stream_to_a_new_console_window__n_teven_when_invoked_from_within_a_service__such_as_the_Apache_server.__n_tAlso_reflects_the_console_input_back_to_the_stdout_stream__allowing_n_tthe_operator_to_respond_to_prompts_from_the_context_of_a_service._n_nSyntax:__s__opts____t__Window_Title___n_n__opts:__character___or__line_input_n_t_quiet_______or__echo_input_n_t_unprocessed_or__processed_input_n_t_nowrap______or__wrap_output_lines_n_t_formatted___or__raw_output_lines_n_t_Ooutput__number_of_seconds__n_t_verbose_error_reporting__for_debugging__n_t___for_this_message_n_n]
push ecx
push edx
mov dword [ebp - 8], edi
call dword [0x402070]
add esp, 8
push 1
call dword [0x40206c]
mov eax, dword [esi]
mov dword [ebp - 8], edi
push eax
push str.wintty_option__s_not_recognized__use____for_help._n_n
call dword [0x402070]
add esp, 8
push 1
call dword [0x40206c]
push 8
lea eax, [ebp - 0x488]
push str.Service_
push eax
call dword [0x402060]
add esp, 0xc
test eax, eax
jne 0x401266
lea ecx, [ebp - 0x488]
push ecx
push str.WindowStation_Name__s_is_a_service_n
call entry0
mov dword [ebp - 0x1c], 1
jmp 0x401263
call dword [0x402054]
push eax
push str.GetProcessWindowStation___failed___d__n
call entry0
add esp, 8
push 0
call dword [0x402050]
push 0xfffffffffffffff6
call dword [0x40204c]
mov edi, dword [0x402048]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x14], ebx
je 0x4012c5
cmp ebx, 0xffffffff
je 0x4012c5
mov edx, dword [ebp - 0x1c]
push 2
push edx
lea eax, [ebp + 8]
push 0
push eax
push esi
push ebx
push esi
call edi
test eax, eax
je 0x4012ae
push ebx
call dword [0x402044]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x14], ecx
jmp 0x4012d9
call dword [0x402054]
push eax
push ebx
push str.DupHandle_stdin___x___failed___d__n
call entry0
add esp, 0xc
jmp 0x4012d9
call dword [0x402054]
push eax
push str.GetStdHandle_STD_INPUT_HANDLE__failed___d__n
call entry0
add esp, 8
push 0xfffffffffffffff5
call dword [0x40204c]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x28], ebx
je 0x40132a
cmp ebx, 0xffffffff
je 0x40132a
mov edx, dword [ebp - 0x1c]
push 2
push edx
lea eax, [ebp + 8]
push 0
push eax
push esi
push ebx
push esi
call edi
test eax, eax
je 0x401313
push ebx
call dword [0x402044]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x28], ecx
jmp 0x40133e
call dword [0x402054]
push eax
push ebx
push str.DupHandle_stdout___x___failed___d__n
call entry0
add esp, 0xc
jmp 0x40133e
call dword [0x402054]
push eax
push str.GetStdHandle_STD_OUTPUT_HANDLE__failed___d__n
call entry0
add esp, 8
push 0xfffffffffffffff4
call dword [0x40204c]
mov ebx, eax
test ebx, ebx
je 0x40138b
cmp ebx, 0xffffffff
je 0x40138b
mov edx, dword [ebp - 0x1c]
push 2
push edx
lea eax, [ebp + 8]
push 0
push eax
push esi
push ebx
push esi
call edi
test eax, eax
je 0x401372
push ebx
call dword [0x402044]
mov ebx, dword [ebp + 8]
jmp 0x40139f
mov esi, dword [0x402054]
call esi
push eax
push ebx
push str.DupHandle_stderr___x___failed___d__n
call entry0
add esp, 0xc
jmp 0x4013a5
call dword [0x402054]
push eax
push str.GetStdHandle_STD_ERROR_HANDLE__failed___d__n
call entry0
add esp, 8
mov esi, dword [0x402054]
call dword [0x402040]
test eax, eax
jne 0x4013bf
call esi
push eax
push str.FreeConsole___failed___d__n
call entry0
add esp, 8
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4014b9
mov dword [ebp - 0x10], 1
xor esi, esi
call dword [0x40203c]
lea ecx, [ebp - 0x58c]
push 0x104
push ecx
push esi
mov dword [ebp - 0xc], eax
call dword [0x402038]
test eax, eax
jne 0x4013f9
lea esi, [ebp - 0x58c]
mov edx, dword [ebp - 0x14]
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x88]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x50], edx
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x88]
push ecx
push edx
push 0
push 0
push 0x14
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0xc]
push 1
push 0
push 0
push eax
push esi
mov dword [ebp - 0x88], 0x44
mov dword [ebp - 0x5c], 0x101
mov dword [ebp - 0x80], str.WinSta0Default
mov word [ebp - 0x58], 1
mov dword [ebp - 0x48], ebx
call dword [0x402034]
test eax, eax
je 0x4014ad
mov ecx, dword [ebp - 0x50]
mov esi, dword [0x402044]
push ecx
call esi
mov edx, dword [ebp - 0x4c]
push edx
call esi
mov eax, dword [ebp - 0x48]
push eax
call esi
mov ecx, dword [ebp - 0x34]
push ecx
call dword [0x402030]
mov edx, dword [ebp - 0x34]
push edx
call esi
mov eax, dword [ebp - 0x38]
push 0xffffffffffffffff
push eax
call dword [0x40202c]
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x10]
push ecx
push edx
call dword [0x402028]
mov eax, dword [ebp - 0x38]
push eax
call esi
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
call dword [0x402024]
test eax, eax
jne 0x4014d3
call esi
push eax
push str.AllocConsole_Default__failed___d__n
call entry0
add esp, 8
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4014f5
push eax
call dword [0x402020]
test eax, eax
jne 0x4014f5
call esi
push eax
push str.SetConsoleTitle___failed___d__n
call entry0
add esp, 8
mov esi, dword [0x40201c]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push str.CONOUT_
call esi
mov edi, dword [0x402018]
mov ebx, eax
test ebx, ebx
je 0x401573
cmp ebx, 0xffffffff
je 0x401573
lea ecx, [ebp + 0xc]
push ecx
push ebx
call dword [0x402014]
test eax, eax
jne 0x40153f
call dword [0x402054]
push eax
push str.GetConsoleMode_CONOUT__failed___d__n
jmp 0x40157f
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x18]
or eax, ecx
mov ecx, dword [ebp - 0x20]
not ecx
and eax, ecx
push eax
push ebx
mov dword [ebp + 0xc], eax
call edi
test eax, eax
jne 0x401587
call dword [0x402054]
mov edx, dword [ebp + 0xc]
push eax
push edx
push str.SetConsoleMode_CONOUT__0x_x__failed___d__n
call entry0
add esp, 0xc
jmp 0x401587
call dword [0x402054]
push eax
push str.CreateFile_CONOUT___failed___d__n
call entry0
add esp, 8
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push str.CONIN_
call esi
mov esi, eax
test esi, esi
je 0x4015f9
cmp esi, 0xffffffff
je 0x4015f9
lea eax, [ebp + 0xc]
push eax
push esi
call dword [0x402014]
test eax, eax
jne 0x4015c5
call dword [0x402054]
push eax
push str.GetConsoleMode_CONIN__failed___d__n
jmp 0x401605
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
or eax, ecx
mov ecx, dword [ebp - 4]
not ecx
and eax, ecx
push eax
push esi
mov dword [ebp + 0xc], eax
call edi
test eax, eax
jne 0x40160d
call dword [0x402054]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
push str.SetConsoleMode_CONIN__0x_x__failed___d__n
call entry0
add esp, 0xc
jmp 0x40160d
call dword [0x402054]
push eax
push str.CreateFile_CONIN___failed___d__n
call entry0
add esp, 8
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x40]
push 0
push ecx
push 0x4017c0
push 0
push 0
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], edx
call dword [0x402010]
mov edi, dword [ebp - 0x14]
mov esi, dword [0x40200c]
lea edx, [ebp - 0x24]
mov dword [ebp - 0xc], eax
push 0
push edx
lea eax, [ebp - 0x488]
push 0x400
push eax
push edi
call esi
test eax, eax
je 0x40168d
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40168d
lea ecx, [ebp - 0x24]
push 0
push ecx
lea edx, [ebp - 0x488]
push eax
push edx
push ebx
call dword [0x402008]
test eax, eax
je 0x40168d
lea eax, [ebp - 0x24]
push 0
push eax
lea ecx, [ebp - 0x488]
push 0x400
push ecx
push edi
call esi
test eax, eax
jne 0x401654
mov esi, dword [0x402054]
call esi
push eax
push str._EOF__from_stdin___d__n
call entry0
mov edx, dword [0x402068]
add esp, 8
add edx, 0x20
push edx
call dword [0x402044]
lea eax, [ebp - 0x488]
push 0x400
push eax
call dword [0x402004]
test eax, eax
jne 0x4016cd
call esi
jmp 0x401716
lea edi, [ebp - 0x488]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x40327c]
repne scasb al, byte es:[edi]
mov ecx, dword [str.____Finished_]
mov eax, dword [0x403280]
dec edi
mov dword [edi], ecx
mov cx, word [0x403284]
mov dword [edi + 4], edx
lea edx, [ebp - 0x488]
push edx
mov dword [edi + 8], eax
mov word [edi + 0xc], cx
call dword [0x402020]
test eax, eax
jne 0x401724
call dword [0x402054]
push eax
push str.SetConsoleTitle___failed___d__n
call entry0
add esp, 8
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
push eax
push ecx
call dword [0x40202c]
call dword [0x402040]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret