Function at 0x14003c590
Capabilities:
Create thread

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rax - 0x1f8]
sub rsp, 0x2d0
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14017a140]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov r14, rdx
mov rdi, rcx
mov byte [rsp + 0x30], 0
and dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0xc0
lea r9, str.NGDiscovery::CDiscoveryServer::SearchForDevices
lea r8, [0x140182c68]
mov rdx, qword [0x1401828c8]
lea rcx, [rbp + 0x120]
call fcn.140003374
nop
xor ebx, ebx
lea r12, vtable.NGDiscovery::CDiscoveryServer::EventThreadParam.0
mov qword [rsp + 0x60], r12
and qword [rsp + 0x68], rbx
lea r13, vtable.NGDiscovery::CDiscoveryServer::EventProcParam.0
mov qword [rsp + 0x70], r13
and dword [rsp + 0x78], ebx
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqa xmmword [rbp - 0x70], xmm1
lea esi, [rbx + 1]
mov dword [rbp - 0x60], esi
lea rax, vtable.NGDiscovery::CDiscoveryServer::DiscoveryThreadParam.0
mov qword [rbp + 0xa0], rax
and qword [rbp + 0xa8], rbx
lea rax, vtable.NGDiscovery::CDiscoveryServer::DiscoveryProcParam.0
mov qword [rbp + 0xb0], rax
lea rcx, [rbp + 0xb8]
call fcn.140009cd8
xor edx, edx
lea r8d, [rbx + 0x28]
lea rcx, [rbp + 0xd8]
call fcn.1400bbca0
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x100], xmm0
mov dword [rbp + 0x110], esi
lea rcx, [rbp + 0x30]
call fcn.14003d450
lea rax, vtable.NGDiscovery::CDiscoveryServer::CAddEventQueue.0
mov qword [rbp + 0x30], rax
lea rcx, [rbp - 0x40]
call fcn.14003d450
lea rax, vtable.NGDiscovery::CDiscoveryServer::CRemoveEventQueue.0
mov qword [rbp - 0x40], rax
xor eax, eax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
lea eax, [rbx + 0xa]
mov dword [rbp - 0x60], eax
mov dword [rbp + 0x110], eax
xor r9d, r9d
xor r8d, r8d
mov edx, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rsi, rax
test rax, rax
jne 0x14003c712
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.CreateEvent_failed__err_d
mov edx, 0x80
lea r8d, [rdx + 0x5e]
lea rcx, [rbp + 0x120]
call fcn.1400037a4
jmp 0x14003c96a
lea rcx, [rbp + 0x30]
call fcn.14003d59c
test rax, rax
je 0x14003c961
lea rcx, [rbp - 0x40]
call fcn.14003d59c
test rax, rax
je 0x14003c961
mov qword [rsp + 0x68], rdi
mov rax, qword [rdi]
mov edx, dword [r14]
mov rcx, rdi
call qword [rax + 0x30]
imul ecx, eax, 0x3e8
mov dword [rsp + 0x78], ecx
mov qword [rbp - 0x80], rsi
mov rax, qword [r14 + 0x10]
mov qword [rbp - 0x78], rax
lea rax, [rbp + 0x30]
mov qword [rbp - 0x70], rax
lea rax, [rbp - 0x40]
mov qword [rbp - 0x68], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
lea r8, [0x14003cb14]
xor edx, edx
xor ecx, ecx
call fcn.1400c5d28
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x14003c7a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0xf5
jmp 0x14003c820
mov qword [rbp + 0xa8], rdi
mov qword [rbp + 0xd8], rsi
movups xmm0, xmmword [r14]
movaps xmmword [rbp + 0xe0], xmm0
movups xmm1, xmmword [r14 + 0x10]
movaps xmmword [rbp + 0xf0], xmm1
lea rax, [rbp + 0x30]
mov qword [rbp + 0x100], rax
lea rax, [rbp - 0x40]
mov qword [rbp + 0x108], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
lea r9, [rbp + 0xa0]
lea r8, [0x14003ca2c]
xor edx, edx
xor ecx, ecx
call fcn.1400c5d28
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x14003c846
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x105
mov edx, 0x80
lea r9, str._beginthreadex_Failed__err_d
mov dword [rsp + 0x20], eax
lea rcx, [rbp + 0x120]
call fcn.1400037a4
mov ebx, reloc.WS2_32.dll_inet_ntoa
jmp 0x14003c8fe
or r12d, 0xffffffff
mov r9d, r12d
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea r13d, [r8 + 2]
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, r12d
jne 0x14003c892
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.WaitForMultipleObjects_failed_with___d_
lea edx, [r13 + 0x7e]
mov r8d, VarUI4FromDisp
lea rcx, [rbp + 0x120]
call fcn.1400037a4
lea ebx, [r13 + 0xa]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov r9d, r12d
mov r8d, 1
lea rdx, [rsp + 0x48]
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test ebx, ebx
jne 0x14003c8f0
cmp eax, r12d
jne 0x14003c8ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.WaitForMultipleObjects_failed_with___d_
mov edx, 0x80
mov r8d, 0x11b
lea rcx, [rbp + 0x120]
call fcn.1400037a4
mov ebx, reloc.WS2_32.dll_inet_ntoa
jmp 0x14003c8f0
mov ebx, dword [rbp + 0x110]
lea r12, vtable.NGDiscovery::CDiscoveryServer::EventThreadParam.0
lea r13, vtable.NGDiscovery::CDiscoveryServer::EventProcParam.0
mov eax, dword [rbp - 0x60]
test eax, eax
jne 0x14003c909
xor ebx, ebx
jmp 0x14003c918
test ebx, ebx
je 0x14003c912
cmp ebx, 3
jne 0x14003c914
mov ebx, eax
test ebx, ebx
jne 0x14003c927
mov rax, qword [rdi]
mov rdx, qword [r14 + 0x10]
mov rcx, rdi
call qword [rax + 0x60]
jmp 0x14003c936
mov rax, qword [rdi]
mov r8, qword [r14 + 0x10]
mov edx, ebx
mov rcx, rdi
call qword [rax + 0x68]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14003c94f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14003c96f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14003c96f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, reloc.WS2_32.dll_inet_ntoa
lea rcx, [rbp - 0x40]
call fcn.14003d554
nop
lea rcx, [rbp + 0x30]
call fcn.14003d554
nop
lea rax, vtable.NGDiscovery::CDiscoveryServer::DiscoveryThreadParam.0
mov qword [rbp + 0xa0], rax
lea rax, vtable.NGDiscovery::CDiscoveryServer::DiscoveryProcParam.0
mov qword [rbp + 0xb0], rax
lea rcx, [rbp + 0xb8]
call fcn.140009c0c
nop
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r13
lea rcx, [rbp + 0x120]
call fcn.1400034bc
mov eax, ebx
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.1400b9f80
lea r11, [rsp + 0x2d0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret