Function at 0x40fab0
Capabilities:
Access peb ldr_data
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x419dd1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x240
mov eax, dword [0x422538]
push ebx
push esi
push edi
mov dword [esp + 0x244], eax
mov eax, dword [0x4776f8]
xor edi, edi
mov ecx, 0x4776f8
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], 1
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
mov edx, dword [0x4776f8]
mov ecx, 0x4776f8
mov dword [esp + 0x254], edi
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
push str.HARDWAREDEVICEMAPSERIALCOMM_
lea ecx, [esp + 0x18]
mov byte [esp + 0x258], 1
call fcn.00406d10
mov edx, dword [esp + 0x14]
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x138]
rep stosd dword es:[edi], eax
mov eax, dword [edx - 4]
mov ecx, 1
sub ecx, eax
mov eax, dword [edx - 8]
sub eax, 0x400
or eax, ecx
mov byte [esp + 0x254], 2
jge 0x40fb83
push 0x400
lea ecx, [esp + 0x18]
call fcn.00401650
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
push 0x20019
push 0
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40fd7b
mov eax, 0x104
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x30]
push edx
mov edx, dword [esp + 0x28]
push 0
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x14c]
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
je 0x40fd7b
jmp 0x40fbf0
lea eax, [esp + 0x138]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fc00
sub eax, edx
push eax
lea eax, [esp + 0x13c]
push eax
lea ecx, [esp + 0x18]
call fcn.00404d10
mov esi, dword [esp + 0x10]
mov eax, dword [esi - 4]
mov edi, dword [esi - 0xc]
mov ecx, 1
sub ecx, eax
mov eax, dword [esi - 8]
sub eax, edi
or eax, ecx
jge 0x40fc43
push edi
lea ecx, [esp + 0x14]
call fcn.00401650
mov esi, dword [esp + 0x10]
mov ebx, dword [sym.imp.MSLUR71.dll__mbsupr]
push esi
call ebx
add esp, 4
test edi, edi
jl 0x40fe8f
cmp edi, dword [esi - 8]
jg 0x40fe8f
push 0x41d26a
mov dword [esi - 0xc], edi
push str.DEVICE_
lea ecx, [esp + 0x18]
mov byte [edi + esi], 0
call fcn.0040edc0
lea eax, [esp + 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fc81
sub eax, edx
push eax
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x20]
call fcn.00404d10
mov esi, dword [esp + 0x18]
mov eax, dword [esi - 4]
mov edi, dword [esi - 0xc]
mov ecx, 1
sub ecx, eax
mov eax, dword [esi - 8]
sub eax, edi
or eax, ecx
jge 0x40fcc1
push edi
lea ecx, [esp + 0x1c]
call fcn.00401650
mov esi, dword [esp + 0x18]
push esi
call ebx
add esp, 4
test edi, edi
jl 0x40fe8f
cmp edi, dword [esi - 8]
jg 0x40fe8f
push 0x41d26a
mov dword [esi - 0xc], edi
push 0x41d8f4
lea ecx, [esp + 0x20]
mov byte [edi + esi], 0
call fcn.0040edc0
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.MSLUR71.dll_atoi]
mov ecx, dword [ebp + 8]
mov esi, dword [esp + 0x14]
add esp, 4
cmp eax, ecx
jne 0x40fd30
mov eax, dword [esi - 0xc]
test eax, eax
jl 0x40fd30
push str.SACUMDM
push esi
call dword [sym.imp.MSLUR71.dll__mbsstr]
add esp, 8
test eax, eax
je 0x40fd30
sub eax, esi
cmp eax, 0xffffffff
jne 0x40fe18
mov eax, dword [esp + 0x2c]
mov ecx, 0x104
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x30]
push edx
push 0
lea ecx, [esp + 0x34]
push ecx
inc eax
lea edx, [esp + 0x14c]
push edx
push eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x40fbf0
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x254], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fdac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
add ebx, 0xfffffff0
mov byte [esp + 0x254], 0
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40fdce
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
add esi, 0xfffffff0
mov dword [esp + 0x254], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40fdf3
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
xor eax, eax
mov ecx, dword [esp + 0x24c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x244]
call fcn.0041937d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x254], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fe3e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
add ebx, 0xfffffff0
mov byte [esp + 0x254], 0
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40fe60
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
add esi, 0xfffffff0
mov dword [esp + 0x254], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40fe85
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov eax, 1
jmp 0x40fdf5
push 0x80070057
call fcn.00401100
int3