Function at 0x140003930
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rsi
sub rsp, 0x70
mov rax, qword [0x14005b0e8]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rax, qword [0x1417bba30]
cmp dword [rax + 0x3c], 0
je 0x140003965
lea rdx, str.Display
lea rcx, str._DBG__ALLOC___s__n
call fcn.140001010
mov edx, 0x30
lea ecx, [rdx - 0x2f]
call qword [sym.imp.msvcrt.dll_calloc]
mov rsi, rax
test rax, rax
je 0x140003c64
mov qword [rsp + 0x80], rbx
mov edx, 8
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], rdi
mov qword [rsp + 0x68], r14
lea ecx, [rdx - 7]
mov qword [rsp + 0x60], r15
call qword [sym.imp.msvcrt.dll_calloc]
mov edx, 8
mov qword [rsi + 0x18], rax
lea ecx, [rdx - 7]
call qword [sym.imp.msvcrt.dll_calloc]
lea rcx, [rsi + 0x28]
mov edx, 8
lea r8, str.Display
mov qword [rsi + 8], rax
mov qword [rsi], rcx
call fcn.140031cc0
mov rcx, qword [0x1417bba30]
xor ebx, ebx
mov dword [rsi + 0x20], 2
xor eax, eax
mov qword [rsp + 0x38], 0x20
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x44], rax
lea rbp, [rbx - 1]
mov dword [rsp + 0x4c], ebx
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x30], ebx
cmp dword [rcx + 0x1c], eax
je 0x140003aaa
mov r14, qword [rcx + 0x220]
mov edi, ebx
mov rax, qword [r14 + 0x18]
cmp qword [rax], rbx
je 0x140003a3b
nop dword [rax]
inc edi
lea rax, [rax + 8]
cmp qword [rax], rbx
jne 0x140003a30
cmp dword [rcx + 0x3c], ebx
je 0x140003a52
mov r8, qword [rsi]
lea rcx, str._DBG__APPEND___s_______s__n
mov rdx, qword [r14]
call fcn.140001010
movsxd rdi, edi
mov edx, 8
lea rcx, [rdi + 1]
add rcx, 1
cmovb rcx, rbp
call qword [sym.imp.msvcrt.dll_calloc]
mov r15, rax
test rax, rax
je 0x140003c76
test rdi, rdi
jle 0x140003a94
mov rdx, rbx
mov rax, qword [r14 + 0x18]
mov rcx, qword [rax + rdx*8]
mov qword [r15 + rdx*8], rcx
inc rdx
cmp rdx, rdi
jl 0x140003a80
mov qword [r15 + rdi*8], rsi
mov rcx, qword [r14 + 0x18]
call qword [sym.imp.msvcrt.dll_free]
mov qword [r14 + 0x18], r15
mov qword [rsi + 0x10], r14
mov r9d, 6
lea rdx, str.DISPLAY
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov rdi, rax
cmp rax, rbp
jne 0x140003bab
mov r14, qword [0x1417bba30]
mov rbx, qword [r14 + 0x240]
test rbx, rbx
jne 0x140003b29
mov ecx, 0x1a
lea edx, [rbx + 1]
add ecx, 2
call qword [sym.imp.msvcrt.dll_calloc]
mov qword [r14 + 0x240], rax
test rax, rax
je 0x140003c88
movups xmm0, xmmword [str.SetupDiGetClassDevs_failed]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x14003a920]
movsd qword [rax + 0x10], xmm0
movzx ecx, word [0x14003a928]
mov word [rax + 0x18], cx
jmp 0x140003c24
mov edx, 1
nop
lea eax, [rdx - 1]
cmp byte [rax + rbx], 0
jne 0x140003b41
mov edi, edx
cmp byte [rdi + rbx], 0
je 0x140003b45
inc edx
jmp 0x140003b30
lea ecx, [rdx + 0x1a]
mov edx, 1
add ecx, 2
cmovb rcx, rbp
call qword [sym.imp.msvcrt.dll_calloc]
mov rbp, rax
test rax, rax
je 0x140003c88
mov r8, rdi
mov rdx, rbx
mov rcx, rax
call sub.msvcrt.dll_memcpy
movups xmm0, xmmword [str.SetupDiGetClassDevs_failed]
mov rcx, rbx
movups xmmword [rdi + rbp], xmm0
movsd xmm0, qword [0x14003a920]
movsd qword [rdi + rbp + 0x10], xmm0
movzx eax, word [0x14003a928]
mov word [rdi + rbp + 0x18], ax
call qword [sym.imp.msvcrt.dll_free]
mov qword [r14 + 0x240], rbp
jmp 0x140003c24
lea rdx, [rsp + 0x30]
lea rcx, str.pnp.ids
call fcn.14001bde0
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rdi
mov rbp, rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140003c12
mov r14d, dword [rsp + 0x30]
nop dword [rax + rax]
mov dword [rsp + 0x28], ebx
lea r8, [rsp + 0x38]
mov r9, rbp
mov dword [rsp + 0x20], r14d
mov rdx, rdi
mov rcx, rsi
call fcn.1400030a0
inc ebx
lea r8, [rsp + 0x38]
mov edx, ebx
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x140003be0
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov rcx, rbp
call qword [sym.imp.msvcrt.dll_free]
mov rcx, rsi
call fcn.1400035f0
mov r14, qword [rsp + 0x68]
mov rax, rsi
mov rdi, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x80]
mov r15, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140029990
add rsp, 0x70
pop rsi
ret
lea rdx, str.Failed_to_allocate_memory_in_NWL_NodeAlloc
mov ecx, 0xe
call fcn.140001650
int3
lea rdx, str.Failed_to_allocate_memory_in_NWL_NodeAppendChild
mov ecx, 0xe
call fcn.140001650
int3
lea rdx, str.Failed_to_allocate_memory_in_NWL_NodeAppendMultiSz
mov ecx, 0xe
call fcn.140001650
int3