Function at 0x40ddf0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x44688b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x938
mov eax, dword [0x4606e0]
xor eax, dword [esp + 0x944]
push ebx
push esi
push edi
xor esi, esi
push 0x44ada9
lea ecx, [esp + 0x14]
mov dword [esp + 0x944], eax
mov dword [esp + 0x18], esi
call fcn.0040dd50
push 0x12
push esi
push esi
push 0x44d580
mov dword [esp + 0x95c], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, eax
cmp ebx, esi
je 0x40dfb3
xor eax, eax
mov dword [esp + 0x18], eax
push ebp
lea esp, [esp]
lea ecx, [esp + 0x28]
push ecx
push eax
push 0x44d580
push 0
push ebx
mov dword [esp + 0x3c], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x40de96
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x40dfab
jmp 0x40df3f
push 0x20019
push 0
lea edx, [esp + 0x30]
push edx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDeviceInterfaceRegKey]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40df3f
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push str.Base_Name
push ebp
mov dword [esp + 0x28], pe_nt_image_headers32
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40defa
mov edi, 0x44d5c0
lea esi, [esp + 0x44]
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40defa
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40df3f
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x28]
push eax
push 0
push str.Port_Number
push ebp
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
push ebp
je 0x40df2c
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40df3f
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x95c]
cmp dword [esp + 0x18], ecx
je 0x40df55
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, 0x100
mov dword [esp + 0x1c], eax
jl 0x40de60
jmp 0x40dfab
push 0
lea edx, [esp + 0x28]
push edx
push 0x800
lea eax, [esp + 0x150]
push eax
lea ecx, [esp + 0x38]
push ecx
push ebx
mov dword [esp + 0x15c], 5
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
test eax, eax
je 0x40dfab
lea eax, [esp + 0x148]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40df90
sub eax, edx
push eax
lea edx, [esp + 0x14c]
push edx
lea ecx, [esp + 0x1c]
call fcn.0040c6e0
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop ebp
mov esi, dword [esp + 0x10]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
add esi, 0xfffffff0
call dword [eax + 0x10]
mov edx, dword [esi + 0xc]
test edx, edx
lea ecx, [esi + 0xc]
jl 0x40dfdd
cmp eax, dword [esi]
jne 0x40dfdd
mov eax, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x40e010
mov ecx, dword [esi + 4]
mov edx, dword [eax]
push 1
push ecx
mov ecx, eax
call dword [edx]
test eax, eax
jne 0x40dff2
call fcn.0040c550
mov edx, dword [esi + 4]
mov dword [eax + 4], edx
mov ecx, dword [esi + 4]
inc ecx
mov edx, ecx
shr ecx, 2
add esi, 0x10
lea edi, [eax + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x954]
add eax, 0x10
mov dword [esi], eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x94c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e045
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x944]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x940]
xor ecx, dword [esp + 0x950]
pop edi
mov eax, esi
pop esi
pop ebx
call fcn.00431760
add esp, 0x944
ret 8