Function at 0x4033e9
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x14]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], 0x80000002
mov eax, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call eax
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x403459
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Cant_open_registry_for_read__s
mov dword [esp], eax
call dbg.error
mov eax, 1
jmp 0x403606
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x1c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
call eax
sub esp, 0x18
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xea
je 0x4034f2
cmp dword [ebp - 0xc], 0
je 0x4034f2
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
sub esp, 4
cmp dword [ebp - 0xc], 2
jne 0x4034c0
mov eax, 0xffffffff
jmp 0x403606
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 8]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Cant_get_registry_value__s_s._return__d
mov dword [esp], eax
call dbg.error
mov eax, 1
jmp 0x403606
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x403518
mov dword [esp + 4], str.Wrong_value_type
mov dword [esp], 0
call dbg.error
mov eax, 1
jmp 0x403606
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40356d
mov eax, dword [ebp - 0x18]
lea ecx, [eax + 1]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str.Cant_malloc__d_._return__d
mov dword [esp], eax
call dbg.error
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
sub esp, 4
mov eax, 1
jmp 0x403606
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x10]
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x1c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
call eax
sub esp, 0x18
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4035e9
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 8]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Failed_to_get_registry__s_s._return__d
mov dword [esp], eax
call dbg.error
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
sub esp, 4
mov eax, 1
jmp 0x403606
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
sub esp, 4
mov eax, 0
leave
ret