Function at 0x40f600
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x4c08e0
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e5b00]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x38]
push 0x428
call fcn.0046110e
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
test esi, esi
jne 0x40f658
xor eax, 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 0x428
push 0
push esi
call fcn.00465660
add esp, 0xc
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi], eax
test eax, eax
je 0x40f642
mov edi, esi
mov ebp, 0x50ce40
jmp 0x40f689
mov esi, dword [esp + 0x18]
mov eax, dword [ebp]
push eax
lea ecx, [esp + 0x18]
call fcn.00402ad0
mov ecx, dword [esp + 0x30]
xor eax, eax
mov dword [esp + 0x28], eax
cmp ecx, eax
je 0x40f6bd
mov eax, ecx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f6b0
mov ecx, dword [esp + 0x30]
sub eax, edx
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040b3d0
lea ecx, [esp + 0x14]
test ebx, ebx
je 0x40f6d9
push 7
push str.typeA
jmp 0x40f6e0
push 9
push str.typeTXT
call fcn.0040b3d0
mov ecx, dword [esi]
mov eax, dword [esp + 0x14]
lea esi, [edi + 0x210]
mov edx, esi
sub edx, eax
mov dword [edi], ecx
add edx, 0xfffffdf8
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40f700
push edi
push 0
push 0x40f210
mov dword [esi], ebx
call fcn.004632c0
mov dword [esp + 0x34], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f744
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 4
add edi, 0x214
cmp ebp, 0x50ce48
jl 0x40f685
mov ebx, dword [esp + 0x18]
mov ecx, dword [ebx]
push 0x7530
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call fcn.0044916d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40f785
push 0x80004005
call fcn.004020d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], 1
xor ecx, ecx
lea esi, [ebx + 0x10c]
cmp dword [esi - 0x108], 0
je 0x40f7be
mov eax, esi
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40f7b3
sub eax, edi
jne 0x40f7cc
inc ecx
add esi, 0x214
cmp ecx, 2
jl 0x40f7a5
jmp 0x40f7fa
imul ecx, ecx, 0x214
lea edx, [ecx + ebx + 0x10c]
test edx, edx
jne 0x40f7e1
xor eax, eax
jmp 0x40f7ef
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f7e6
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.004029c0
mov esi, dword [esp + 0x18]
push 0x3b
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x24], esp
mov ebp, esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40f82e
cmp eax, dword [esi]
jne 0x40f82e
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x40f863
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x40f847
call fcn.00401e90
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
lea ecx, [esi + 0x10]
push ecx
push eax
lea edx, [edi + 0x10]
push edx
call fcn.0046087f
add esp, 0x10
mov ecx, dword [esp + 0x3c]
add edi, 0x10
mov dword [ebp], edi
call fcn.00413380
push 8
call fcn.0046110e
add esp, 0xc
test eax, eax
je 0x40f89a
push eax
xor ecx, ecx
push ecx
push 0x40f310
mov dword [eax + 4], 2
mov dword [eax], ebx
call fcn.004632c0
add esp, 0xc
mov dword [esp + 0x28], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f8bb
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, 1
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret