Function at 0x402340
Capabilities:
Create thread
Terminate process
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
call fcn.004020bc
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x1c], 0xc
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov dword [eax + 0xc], edx
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4028a0
mov dword [esp + 4], 0
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
call eax
sub esp, 0x18
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x40241f
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0x40a4b0
mov dword [esp], eax
call sub.msvcrt.dll__itoa
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], str.Failed_to_create_ReadShell_session_thread__error___s
call fcn.0040307f
mov eax, dword [ebp - 0xc]
mov dword [eax + 0xc], 0xffffffff
mov eax, 0
jmp 0x402713
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x402a68
mov dword [esp + 4], 0
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
call eax
sub esp, 0x18
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x4024f1
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0x40a4b0
mov dword [esp], eax
call sub.msvcrt.dll__itoa
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], str.Failed_to_create_ReadShell_session_thread__error___s
call fcn.0040307f
mov eax, dword [ebp - 0xc]
mov dword [eax + 0xc], 0xffffffff
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateThread]
call eax
sub esp, 8
mov eax, 0
jmp 0x402713
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x24], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], 3
mov eax, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
call eax
sub esp, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
cmp eax, 1
je 0x402587
cmp eax, 2
je 0x4025c2
test eax, eax
jne 0x4025fa
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateThread]
call eax
sub esp, 8
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateProcess]
call eax
sub esp, 8
jmp 0x402652
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateThread]
call eax
sub esp, 8
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateProcess]
call eax
sub esp, 8
jmp 0x402652
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateThread]
call eax
sub esp, 8
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateThread]
call eax
sub esp, 8
jmp 0x402652
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0x40a4b0
mov dword [esp], eax
call sub.msvcrt.dll__itoa
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], str.WaitForMultipleObjects_error:__s
call fcn.0040307f
nop
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_shutdown]
call eax
sub esp, 8
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, 1
leave
ret