Function at 0x476180
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x6e1c7c]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
push 0
push 0
push 1
push 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov esi, eax
mov dword [edi + 4], esi
test esi, esi
jne 0x476202
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [esp + 0x14], eax
call dword [edx]
mov eax, dword fs:[0x2c]
mov ecx, dword [0x6efa1c]
mov edx, dword [eax]
cmp ecx, dword [edx + 4]
jg 0x47630c
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x6ef9f8
test eax, eax
jne 0x476359
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 8], eax
mov dword [edi + 8], eax
cmp dword [ebx + 8], 0
jne 0x476260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [esp + 0x14], eax
call dword [edx]
mov eax, dword fs:[0x2c]
mov ecx, dword [0x6efa1c]
mov edx, dword [eax]
cmp ecx, dword [edx + 4]
jg 0x476367
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x6ef9f8
test eax, eax
jne 0x4763b4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push 0
push edi
push 0x476420
push dword [esp + 0x1c]
push 0
call fcn.00628498
add esp, 0x18
mov dword [ebx + 4], eax
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4762e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [esp + 0x10], eax
call dword [edx]
test esi, esi
je 0x4762a9
push esi
call ebx
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 8]
test eax, eax
je 0x4762b7
push eax
call ebx
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x6efa1c]
cmp eax, dword [ecx + 4]
jg 0x4763c2
mov eax, dword [esp + 0xc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0x6ef9f8
test eax, eax
jne 0x47640f
test esi, esi
je 0x4762f8
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebx
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.006021fd
mov esp, ebp
pop ebp
ret 8
push 0x6efa1c
call fcn.00602894
add esp, 4
cmp dword [0x6efa1c], 0xffffffff
jne 0x4761ea
push 0x6532d0
mov dword [0x6ef9fc], 0x6ef9f8
mov dword [0x6ef9f8], 0x6af23c
call fcn.006026d1
add esp, 4
push 0x6efa1c
call fcn.0060284a
add esp, 4
jmp 0x4761ea
mov edx, str.thread.entry_event
lea ecx, [esp + 0x10]
call fcn.0044fae0
push 0x6efa1c
call fcn.00602894
add esp, 4
cmp dword [0x6efa1c], 0xffffffff
jne 0x476248
push 0x6532d0
mov dword [0x6ef9fc], 0x6ef9f8
mov dword [0x6ef9f8], 0x6af23c
call fcn.006026d1
add esp, 4
push 0x6efa1c
call fcn.0060284a
add esp, 4
jmp 0x476248
mov edx, str.thread.exit_event
lea ecx, [esp + 0x10]
call fcn.0044fae0
push 0x6efa1c
call fcn.00602894
add esp, 4
cmp dword [0x6efa1c], 0xffffffff
jne 0x4762d0
push 0x6532d0
mov dword [0x6ef9fc], 0x6ef9f8
mov dword [0x6ef9f8], 0x6af23c
call fcn.006026d1
add esp, 4
push 0x6efa1c
call fcn.0060284a
add esp, 4
jmp 0x4762d0
mov edx, str.thread
lea ecx, [esp + 0x18]
call fcn.0044fae0
int3