Function at 0x404890
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x406e57
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24c
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x138]
call fcn.00403b90
xor ebx, ebx
lea eax, [esp + 0x13c]
push ebx
push ebx
push ebx
push ebx
mov dword [esp + 0x274], ebx
mov dword [0x40aa90], eax
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0x11c], eax
mov dword [esp + 0x120], 0x88b8
mov cl, byte [esp + 0x13]
push 0xc
mov byte [esp + 0x268], 1
mov byte [esp + 0x128], bl
mov dword [esp + 0x12c], ebx
mov byte [esp + 0x130], cl
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esp + 0x134], eax
mov dword [esp + 0x138], ebx
mov esi, dword [sym.imp.MSVCRT.dll_signal]
lea edx, [esp + 0x1c]
push 0x4055d0
push 0xf
mov byte [esp + 0x270], 2
mov dword [0x40aa94], edx
call esi
push 0x4055d0
push 2
call esi
add esp, 0x14
mov ecx, 0x40aa70
push 0x405380
push 0x1d4c0
call fcn.00405c50
push str.cwblm_pipe
lea ecx, [esp + 0x1c]
call fcn.00401cf0
mov ebp, dword [sym.imp.MSVCRT.dll__beginthread]
lea ecx, [esp + 0x18]
call fcn.00401de0
mov edi, eax
mov al, byte [esp + 0x13c]
cmp al, bl
jne 0x404a53
cmp edi, ebx
je 0x4049fe
push 0xc
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
add esp, 4
mov esi, eax
lea ecx, [esp + 0x18]
lea eax, [esp + 0x138]
push edx
mov dword [esi + 8], ecx
push edi
lea ecx, [esp + 0x1c]
mov dword [esi], edi
mov dword [esi + 4], eax
call sub.cwbsv.dll_Ordinal_3506
push eax
push str.LMServer___Kicking_off_worker_thread_:
mov ecx, 0x40a980
call sub.cwbsv.dll_Ordinal_3322
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3334
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3336
push esi
push ebx
push 0x404bb0
call ebp
add esp, 0xc
cmp eax, ebx
je 0x404a2d
jmp 0x404980
mov eax, dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LMServer___Warning_:_Server_received_bad_connection_attempt__
mov ecx, 0x40a980
call sub.cwbsv.dll_Ordinal_3322
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3329
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3336
jmp 0x404980
push esi
call fcn.004068c2
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
add esp, 4
push ecx
push str.LMServer___Failure_:_CreateThread
mov ecx, 0x40a980
call sub.cwbsv.dll_Ordinal_3322
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3336
lea ecx, [esp + 0x18]
call fcn.004020c0
push ebx
push 1
lea ecx, [esp + 0x140]
call fcn.00403ce0
mov edx, dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
mov ecx, 0x40a980
push edx
push str.LMServer___Main_:_Shutdown_Started
call sub.cwbsv.dll_Ordinal_3322
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3336
lea ecx, [esp + 0x138]
call fcn.00403ac0
lea ecx, [esp + 0x138]
call fcn.00404280
lea ecx, [esp + 0x138]
call fcn.00403b20
mov eax, dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
mov ecx, 0x40a980
push eax
push str.LMServer___Main_:_Shutdown_waiting_on_child_threads__if_any_
call sub.cwbsv.dll_Ordinal_3322
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3336
lea ecx, [esp + 0x138]
call fcn.00403b80
test eax, eax
je 0x404af3
mov esi, dword [sym.imp.KERNEL32.dll_SleepEx]
push ebx
push 0x32
call esi
lea ecx, [esp + 0x138]
call fcn.00403b80
test eax, eax
jne 0x404ade
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
push ecx
push str.LMServer___Main_:_Shutdown_Complete
mov ecx, 0x40a980
call sub.cwbsv.dll_Ordinal_3322
mov ecx, eax
call sub.cwbsv.dll_Ordinal_3336
lea ecx, [esp + 0x18]
mov byte [esp + 0x264], 4
call fcn.004020c0
mov eax, dword [esp + 0x130]
mov byte [esp + 0x264], 3
mov edi, eax
mov esi, dword [eax]
cmp esi, eax
je 0x404b59
mov eax, esi
mov esi, dword [esi]
lea edx, [esp + 0x14]
push eax
push edx
lea ecx, [esp + 0x134]
call fcn.00405870
cmp esi, edi
jne 0x404b38
mov eax, dword [esp + 0x130]
push eax
call fcn.004068c2
mov eax, dword [esp + 0x120]
add esp, 4
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], ebx
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x138]
mov dword [esp + 0x264], 0xffffffff
call fcn.00403c50
mov ecx, dword [esp + 0x25c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x258
ret