Function at 0x40308e
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x340
mov dword [ebp - 0x330], 0
mov eax, dword [ebp + 8]
mov ecx, dword [0x4118f0]
mov dword [eax], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x330]
mov dword [edx + 4], eax
lea ecx, [ebp - 0x32c]
push ecx
mov edx, dword [str.Config_ManagerEnum_]
push edx
push 0x80000006
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4030dc
xor eax, eax
jmp 0x4035b0
mov dword [ebp - 8], 0
push 0x104
lea eax, [ebp - 0x328]
push eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x340], ecx
mov edx, dword [ebp - 0x340]
push edx
mov eax, dword [ebp - 0x32c]
push eax
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x403592
cmp dword [ebp - 0x330], 4
jge 0x403592
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x328]
push eax
mov ecx, dword [ebp - 0x32c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x403148
jmp 0x4030e3
mov dword [ebp - 0x224], 0x104
lea edx, [ebp - 0x224]
push edx
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x104
add eax, 0x41960c
push eax
push 0
push 0
mov ecx, dword [str.HardWareKey]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403583
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x104
mov ecx, dword [ebp - 0x224]
mov byte [eax + ecx + 0x41960c], 0
mov edx, dword [ebp - 0x330]
imul edx, edx, 0x104
add edx, 0x41960c
push edx
call fcn.004018fc
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
shr eax, 0x10
mov word [ebp - 0x118], ax
mov ecx, dword [ebp - 0x118]
and ecx, 0xffff
cmp ecx, 0x1393
je 0x4031f0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4030e3
mov eax, dword [ebp - 4]
and eax, 0xffff
mov word [ebp - 0x114], ax
mov dword [ebp - 0x220], 0
jmp 0x40321a
mov ecx, dword [ebp - 0x220]
add ecx, 1
mov dword [ebp - 0x220], ecx
cmp dword [ebp - 0x220], 0x17
jge 0x4032d2
mov edx, dword [ebp - 0x114]
and edx, 0xffff
mov eax, dword [ebp - 0x220]
shl eax, 4
xor ecx, ecx
mov cx, word [eax + 0x40ecc8]
cmp edx, ecx
jne 0x4032cd
mov edx, dword [ebp - 0x330]
imul edx, edx, 0x504
mov eax, dword [ebp + 8]
mov dword [eax + edx + 0x10], 1
mov ecx, dword [ebp - 0x330]
imul ecx, ecx, 0x504
mov edx, dword [ebp + 8]
mov ax, word [ebp - 0x114]
mov word [edx + ecx + 0x400], ax
mov ecx, dword [ebp - 0x220]
shl ecx, 4
mov edx, dword [ebp - 0x330]
imul edx, edx, 0x504
mov eax, dword [ebp + 8]
mov ecx, dword [ecx + 0x40eccc]
mov dword [eax + edx + 0x2b8], ecx
mov edx, dword [ebp - 0x220]
shl edx, 4
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
mov dx, word [edx + 0x40ecca]
mov word [ecx + eax + 8], dx
jmp 0x4032d2
jmp 0x40320b
cmp dword [ebp - 0x220], 0x17
jne 0x4032e0
jmp 0x4030e3
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x104
add eax, 0x41960c
push eax
call fcn.004019d0
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
shr ecx, 8
mov edx, dword [ebp - 0x330]
imul edx, edx, 0x504
mov eax, dword [ebp + 8]
mov word [eax + edx + 0x402], cx
mov ecx, dword [ebp - 4]
and ecx, 0xff
mov edx, dword [ebp - 0x330]
imul edx, edx, 0x504
mov eax, dword [ebp + 8]
mov word [eax + edx + 0x404], cx
mov ecx, dword [ebp - 0x330]
imul ecx, ecx, 0x104
add ecx, 0x41960c
push ecx
mov edx, dword [ebp - 0x330]
imul edx, edx, 0x504
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x406]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x104
add eax, 0x41960c
push eax
call fcn.00401c82
add esp, 8
lea ecx, [ebp - 0x110]
push ecx
mov edx, dword [str.EnumMF_]
push edx
push str._sCHILD0000_s
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x338]
push ecx
lea edx, [ebp - 0x21c]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4033d2
xor eax, eax
jmp 0x4035b0
mov dword [ebp - 0x334], 0x104
mov dword [ebp - 0x33c], str.UartType
lea eax, [ebp - 0x334]
push eax
push 0x4118f8
push 0
push 0
mov ecx, dword [ebp - 0x33c]
push ecx
mov edx, dword [ebp - 0x338]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0x4118f8
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x338]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x330]
imul ecx, ecx, 0x504
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 8]
push eax
lea ecx, [ebp - 0x110]
push ecx
call fcn.004021dc
add esp, 8
test eax, eax
jne 0x40346c
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4030e3
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 8]
push edx
lea eax, [ebp - 0x110]
push eax
call fcn.0040632a
add esp, 8
test eax, eax
jne 0x4034a2
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4030e3
mov edx, dword [ebp - 0x330]
imul edx, edx, 0x504
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00404011
add esp, 8
cmp eax, 1
jne 0x403583
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + eax + 0x402]
test edx, edx
jne 0x403574
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + eax + 0x404]
test edx, edx
jne 0x403574
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
mov dx, word [ecx + eax + 0x224]
push edx
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x404]
push edx
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x402]
push edx
mov eax, dword [ebp - 0x330]
imul eax, eax, 0x504
mov ecx, dword [ebp + 8]
mov dx, word [ecx + eax + 0x400]
push edx
push 0x1393
call fcn.00402bb1
add esp, 0x14
mov eax, dword [ebp - 0x330]
add eax, 1
mov dword [ebp - 0x330], eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4030e3
mov edx, dword [ebp - 0x32c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x330]
mov dword [eax + 4], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret