Function at 0x502200
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
mov dword [eax + 4], ecx
cmp dword [ebp - 4], 0
jne 0x50229c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp + 8]
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0
je 0x50225b
push 1
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
mov ecx, dword [ebp - 0xc]
mov eax, dword [edx]
call eax
mov dword [ebp - 0x1c], eax
jmp 0x502262
mov dword [ebp - 0x1c], 0
call fcn.004f6e40
push eax
mov ecx, dword [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x40]
call fcn.004d9020
push 0x1a
push str.start_thread
push 0x4c
push str.C:local_boost_1_84_0_boost_asiodetailimplwin_thread.ipp
lea ecx, [ebp - 0x68]
call fcn.004db6c0
push eax
push str.thread.entry_event
lea edx, [ebp - 0x40]
push edx
call fcn.00503a80
add esp, 0xc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 8], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 8]
cmp dword [ecx + 8], 0
jne 0x502331
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp + 8]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
je 0x5022f0
push 1
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x10]
mov eax, dword [edx]
call eax
mov dword [ebp - 0x24], eax
jmp 0x5022f7
mov dword [ebp - 0x24], 0
call fcn.004f6e40
push eax
mov ecx, dword [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.004d9020
push 0x1a
push str.start_thread
push 0x56
push str.C:local_boost_1_84_0_boost_asiodetailimplwin_thread.ipp
lea ecx, [ebp - 0x78]
call fcn.004db6c0
push eax
push str.thread.exit_event
lea edx, [ebp - 0x4c]
push edx
call fcn.00503a80
add esp, 0xc
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
push 0x505550
mov edx, dword [ebp + 0xc]
push edx
push 0
call fcn.00564380
add esp, 0x18
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
jne 0x5023fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x502390
push 1
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx]
call eax
mov dword [ebp - 0x30], eax
jmp 0x502397
mov dword [ebp - 0x30], 0
cmp dword [ebp - 4], 0
je 0x5023a7
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 8]
cmp dword [edx + 8], 0
je 0x5023bd
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004f6e40
push eax
mov edx, dword [ebp - 0x34]
push edx
lea ecx, [ebp - 0x58]
call fcn.004d9020
push 0x1a
push str.start_thread
push 0x66
push str.C:local_boost_1_84_0_boost_asiodetailimplwin_thread.ipp
lea ecx, [ebp - 0x88]
call fcn.004db6c0
push eax
push str.thread
lea eax, [ebp - 0x58]
push eax
call fcn.00503a80
add esp, 0xc
cmp dword [ebp - 4], 0
je 0x502416
push 0xffffffffffffffff
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esp, ebp
pop ebp
ret 8