Function at 0x40b960
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x44c868
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x465d3c]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
call fcn.0040d0de
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b9a1
push 0x80004005
call fcn.00401060
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov dword [esp + 0x28], 0
call fcn.0040d0de
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b9d3
push 0x80004005
call fcn.00401060
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x34]
push ecx
push edx
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], 1
call fcn.00401e40
mov ebx, dword [esp + 0x18]
cmp dword [ebx - 0xc], 0
jne 0x40ba2e
add ebx, 0xfffffff0
mov byte [esp + 0x28], 0
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ba26
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
lea eax, [esi - 0x10]
jmp 0x40bb12
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040b5c0
mov edx, dword [eax]
push ebx
push edx
lea eax, [esp + 0x20]
push str._s_t_s
push eax
mov byte [esp + 0x3c], 2
call fcn.00402380
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 0x14
mov byte [esp + 0x28], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ba78
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
mov edi, dword [ecx - 0xc]
push 0xc
call fcn.0040c6e7
add esp, 4
test eax, eax
je 0x40baea
call fcn.0040af30
mov esi, eax
test esi, esi
je 0x40baea
lea ebp, [edi + 1]
push ebp
call fcn.0040c716
add esp, 4
mov dword [esi], eax
test eax, eax
je 0x40bb47
push ebp
push 0
push eax
call fcn.00431220
mov edx, dword [esp + 0x20]
mov eax, dword [esi]
push edi
push edx
push eax
call fcn.00430eb0
add esp, 0x18
push 0
push 0
push esi
push 0x40b730
push 0
push 0
mov dword [esi + 4], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x40baea
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add ebx, 0xfffffff0
mov byte [esp + 0x28], 0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bb0b
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x28], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bb33
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push esi
call fcn.0040c721
lea eax, [ebx - 0x10]
add esp, 4
mov byte [esp + 0x28], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bb0b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40bb0b