Function at 0x40bdf0
Capabilities:
Access peb ldr_data
Get process heap flags
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
cmp word [ecx], 0
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x68], ecx
je 0x40c69a
mov eax, ecx
jmp 0x40be20
add eax, 2
cmp word [eax], 0
jne 0x40be20
mov edi, dword [ebp - 0x68]
sub eax, edi
add eax, 0xe
mov dword [esp], eax
call sym._heap_xalloc
mov ebx, eax
mov eax, dword [ebp - 0x68]
cmp word [eax], 0
je 0x40c6a4
nop
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40be50
mov esi, dword [ebp - 0x68]
sub eax, esi
sar eax, 1
add eax, 7
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x68]
mov edx, str._r_n__s__r_n
mov dword [esp + 8], edx
mov dword [esp], ebx
mov dword [esp + 0xc], ecx
call sym._swprintf
mov ecx, dword [ebp + 8]
mov edx, ebx
mov eax, dword [ebp - 0x50]
call sym._REGPROC_write_line
xor ecx, ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x64], eax
call eax
sub esp, 0xc
mov dword [esp], 0x200
call sym._heap_xalloc
mov dword [esp], 0x800
mov edi, eax
call sym._heap_xalloc
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x48], 0x800
mov dword [ebp - 0x4c], 0x100
mov dword [ebp - 0x3c], eax
lea esi, [esi]
lea edi, [edi]
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call sym._RegEnumValueW_32
sub esp, 0x20
test eax, eax
je 0x40bfa0
cmp eax, 0xea
jne 0x40c4d0
mov ebx, dword [ebp - 0x28]
cmp ebx, dword [ebp - 0x48]
jbe 0x40c140
mov esi, dword [ebp - 0x3c]
mov eax, dword fs:[0x18]
test esi, esi
je 0x40c450
mov dword [esp + 0xc], ebx
mov ecx, dword [ebp - 0x3c]
xor edx, edx
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov dword [ebp - 0x3c], eax
sub esp, 0x10
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40c6ae
mov dword [ebp - 0x48], ebx
jmp 0x40bef0
mov eax, dword [ebp - 0x28]
test edi, edi
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
mov eax, 0x412be0
je 0x40bfc0
cmp word [edi], 0
jne 0x40c268
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40bfc0
sub eax, 0x412be0
mov ecx, dword [ebp + 8]
mov edx, 0x412be0
sar eax, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x50]
call sym._REGPROC_write_line
cmp ebx, 1
mov esi, dword [ebp - 0x1c]
je 0x40c1f0
cmp ebx, 4
je 0x40c190
cmp ebx, 3
jne 0x40c308
mov ebx, 0x412bd4
lea esi, [esi]
lea edi, [edi]
add ebx, 2
cmp word [ebx], 0
jne 0x40c010
mov eax, dword [ebp - 0x50]
mov edx, 0x412bd4
mov ecx, dword [ebp + 8]
call sym._REGPROC_write_line
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40c121
sub ebx, 0x412bd4
sar ebx, 1
lea edx, [ebx + esi]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x40]
lea ecx, [eax - 1]
mov dword [ebp - 0x58], ecx
lea eax, [eax + eax*2]
add eax, eax
mov dword [esp], eax
call sym._heap_xalloc
mov edx, dword [ebp - 0x44]
mov esi, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x6c], edi
xor ecx, ecx
xor ebx, ebx
mov edi, ecx
jmp 0x40c076
inc ebx
cmp dword [ebp - 0x40], ebx
jbe 0x40c0f0
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x5c]
mov ecx, str._02x
movzx eax, byte [eax + ebx]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov eax, 3
mov dword [esp + 4], eax
lea eax, [esi + edi*2]
mov dword [esp], eax
call sym._swprintf
add eax, edi
cmp dword [ebp - 0x58], ebx
je 0x40c0f0
mov edx, dword [ebp - 0x44]
lea edi, [eax + 1]
add eax, eax
mov word [esi + eax], 0x2c
mov word [esi + eax + 2], 0
add edx, 3
cmp edx, 0x4c
jbe 0x40c070
mov edi, dword [ebp - 0x50]
mov edx, esi
inc ebx
mov ecx, dword [ebp + 8]
mov eax, edi
call sym._REGPROC_write_line
mov ecx, dword [ebp + 8]
mov edx, str._r_n
mov eax, edi
xor edi, edi
call sym._REGPROC_write_line
mov edx, 2
cmp dword [ebp - 0x40], ebx
ja 0x40c076
mov edi, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x50]
mov edx, esi
mov ecx, dword [ebp + 8]
call sym._REGPROC_write_line
mov dword [esp + 8], esi
mov eax, dword fs:[0x18]
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x64]
call eax
sub esp, 0xc
mov ecx, dword [ebp + 8]
mov edx, 0x412b5c
mov eax, dword [ebp - 0x50]
call sym._REGPROC_write_line
inc dword [ebp - 0x54]
jmp 0x40bef0
mov eax, dword [ebp - 0x4c]
mov edx, dword fs:[0x18]
lea ebx, [eax + eax]
shl eax, 2
test edi, edi
je 0x40c478
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov edi, eax
test edi, edi
je 0x40c6ae
mov dword [ebp - 0x4c], ebx
jmp 0x40bef0
mov dword [esp], 0x1e
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x40c4a0
call sym._heap_xalloc
mov esi, str.hex__x_:
mov ecx, 4
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov ebx, eax
mov eax, 0xf
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._swprintf
mov eax, dword [ebp - 0x50]
mov edx, ebx
mov ecx, dword [ebp + 8]
call sym._REGPROC_write_line
mov dword [esp + 8], ebx
mov eax, dword fs:[0x18]
jmp 0x40c10a
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40c1fd
shr eax, 1
dec eax
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x3c]
call sym._REGPROC_escape_string
mov ebx, eax
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax + 6]
mov dword [esp], eax
call sym._heap_xalloc
mov dword [esp + 0xc], ebx
mov esi, eax
mov eax, str.__s_
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], esi
add eax, 3
mov dword [esp + 4], eax
call sym._swprintf
xor edx, edx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x64]
call eax
sub esp, 0xc
jmp 0x40c0f3
mov edx, dword [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
mov eax, edi
call sym._REGPROC_escape_string
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax + 8]
mov dword [esp], eax
call sym._heap_xalloc
mov ecx, 0x412b74
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov esi, eax
mov eax, dword [ebp - 0x44]
mov dword [esp], esi
mov dword [esp + 0xc], eax
lea eax, [ecx + 4]
mov dword [esp + 4], eax
call sym._swprintf
mov ecx, dword [ebp + 8]
mov edx, esi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x50]
call sym._REGPROC_write_line
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 4], esi
mov esi, dword [ebp - 0x64]
mov edx, dword fs:[0x18]
mov dword [ebp - 0x58], edx
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x58]
sub esp, 0xc
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
jmp 0x40bfe3
mov dword [esp], 0x1e
call sym._heap_xalloc
mov ecx, 0xf
mov dword [esp + 4], ecx
mov dword [esp + 0xc], ebx
mov edx, eax
mov eax, str.hex__x_:
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [ebp - 0x58], edx
call sym._swprintf
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x50]
call sym._REGPROC_write_line
mov edx, dword [ebp - 0x58]
mov eax, dword fs:[0x18]
mov ecx, dword [ebp - 0x64]
mov dword [esp + 8], edx
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ecx
mov ecx, dword [ebp - 0x40]
sub esp, 0xc
test ecx, ecx
je 0x40c121
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp + 8]
add edx, esi
test eax, eax
jne 0x40c03f
cmp ebx, 2
je 0x40c395
cmp ebx, 7
jne 0x40c03f
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40c67b
mov dword [ebp - 0x44], edx
xor eax, eax
mov esi, dword [ebp - 0x40]
mov dword [esp + 0x1c], eax
xor eax, eax
xor edx, edx
mov dword [esp + 0x18], eax
xor eax, eax
mov ebx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x3c]
shr esi, 1
mov dword [esp + 4], edx
mov dword [esp + 0xc], esi
mov dword [esp], 0
mov dword [esp + 8], eax
call ebx
mov dword [ebp - 0x40], eax
sub esp, 0x20
mov dword [esp], eax
call sym._heap_xalloc
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp - 0x40]
mov dword [esp + 0xc], esi
mov dword [esp], 0
mov dword [esp + 0x14], ecx
mov dword [ebp - 0x5c], eax
mov edx, eax
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
call ebx
mov ebx, dword [ebp - 0x40]
lea eax, [ebx - 1]
mov dword [ebp - 0x58], eax
lea eax, [ebx + ebx*2]
sub esp, 0x20
add eax, eax
mov dword [esp], eax
call sym._heap_xalloc
test ebx, ebx
mov edx, dword [ebp - 0x44]
mov esi, eax
jne 0x40c063
jmp 0x40c0f3
mov dword [esp + 8], ebx
xor ecx, ecx
mov dword [esp + 4], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x3c], eax
sub esp, 0xc
jmp 0x40bf89
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
jmp 0x40c17a
call sym._heap_xalloc
mov esi, eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov eax, str.dword:_08x
mov dword [esp + 8], eax
mov eax, 0xf
mov dword [esp + 4], eax
call sym._swprintf
jmp 0x40c0f3
mov eax, dword [ebp - 0x3c]
xor ecx, ecx
mov dword [esp + 4], ecx
mov esi, dword [ebp - 0x64]
mov ebx, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
mov dword [esp + 8], edi
xor edi, edi
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
mov dword [esp], 0x202
call sym._heap_xalloc
mov ebx, eax
mov eax, dword [ebp - 0x68]
cmp word [eax], 0
je 0x40c68e
nop
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40c530
mov edx, dword [ebp - 0x68]
sub eax, edx
sar eax, 1
mov dword [ebp - 0x44], eax
mov edi, dword [ebp - 0x60]
xor esi, esi
mov eax, dword fs:[0x18]
mov dword [ebp - 0x40], eax
xor eax, eax
xor edx, edx
mov dword [esp + 0x14], eax
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [ebp - 0x24], 0x101
call sym._RegEnumKeyExW_32
sub esp, 0x20
test eax, eax
jne 0x40c650
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x44]
lea edx, [ecx + eax + 2]
mov dword [ebp - 0x3c], edx
lea eax, [edx + edx]
mov dword [esp], eax
call sym._heap_xalloc
mov edx, dword [ebp - 0x3c]
mov dword [esp + 0x10], ebx
mov dword [esp + 4], edx
mov ecx, eax
mov eax, dword [ebp - 0x68]
mov dword [esp], ecx
mov dword [ebp - 0x3c], ecx
mov dword [esp + 0xc], eax
mov eax, str._s_s
mov dword [esp + 8], eax
call sym._swprintf
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov eax, 0x20019
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call sym._RegOpenKeyExW_20
mov ecx, dword [ebp - 0x3c]
sub esp, 0x14
test eax, eax
je 0x40c628
mov dword [esp + 8], ecx
xor eax, eax
inc esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x64]
call eax
sub esp, 0xc
jmp 0x40c551
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call sym._export_registry_data
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._RegCloseKey_4
mov ecx, dword [ebp - 0x3c]
sub esp, 4
jmp 0x40c5fe
mov dword [esp + 8], ebx
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x64]
call eax
xor eax, eax
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0
call sym._heap_xalloc
mov esi, eax
jmp 0x40c0f3
mov dword [ebp - 0x44], 0
jmp 0x40c543
mov eax, 0xe
jmp 0x40be31
mov eax, 7
jmp 0x40be63
call sym._heap_xrealloc.part.0
lea esi, [esi]
lea edi, [edi]