Function at 0x402ba0
Capabilities:
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 - 0x58], edx
mov dword [ebp - 0x68], ecx
je 0x403199
mov eax, ecx
jmp 0x402bd0
add eax, 2
cmp word [eax], 0
jne 0x402bd0
mov esi, dword [ebp - 0x68]
sub eax, esi
add eax, 0xe
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x6c], eax
call eax
mov ebx, eax
mov eax, esi
lea esi, [esi]
lea edi, [edi]
add eax, 2
cmp word [eax], 0
jne 0x402c00
mov ecx, dword [ebp - 0x68]
sub eax, ecx
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 eax, dword [ebp - 0x50]
mov edx, ebx
call sym._write_file
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
mov dword [ebp - 0x64], eax
call eax
mov esi, dword [ebp - 0x6c]
mov dword [esp], 0x200
call esi
mov dword [esp], 0x800
mov dword [ebp - 0x3c], eax
call esi
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x40], 0x800
mov dword [ebp - 0x48], 0x100
mov edi, eax
lea esi, [esi]
lea edi, [edi]
mov dword [esp + 0x18], edi
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0x1c], 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 - 0x3c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call sym._RegEnumValueW_32
sub esp, 0x20
test eax, eax
je 0x402d00
cmp eax, 0xea
jne 0x402fe0
mov ebx, dword [ebp - 0x28]
cmp ebx, dword [ebp - 0x40]
jbe 0x402ee0
mov dword [esp], edi
mov dword [esp + 4], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x40], ebx
mov edi, eax
jmp 0x402c80
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x20]
test ecx, ecx
mov dword [ebp - 0x44], eax
mov eax, 0x4090e0
je 0x402d20
cmp word [ecx], 0
jne 0x402f70
nop
add eax, 2
cmp word [eax], 0
jne 0x402d20
sub eax, 0x4090e0
mov edx, 0x4090e0
sar eax, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x50]
call sym._write_file
cmp ebx, 1
mov esi, dword [ebp - 0x1c]
je 0x402e60
cmp ebx, 4
je 0x402f08
cmp ebx, 3
jne 0x403110
mov ebx, 0x4090e6
lea esi, [esi]
lea edi, [edi]
add ebx, 2
cmp word [ebx], 0
jne 0x402d70
mov eax, dword [ebp - 0x50]
mov edx, 0x4090e6
call sym._write_file
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x402ec8
sub ebx, 0x4090e6
sar ebx, 1
lea edx, [ebx + esi]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x44]
xor ebx, ebx
lea ecx, [eax - 1]
mov dword [ebp - 0x60], ecx
lea eax, [eax + eax*2]
add eax, eax
mov dword [esp], eax
mov eax, dword [ebp - 0x6c]
call eax
xor ecx, ecx
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x5c], edi
mov esi, ecx
mov edi, eax
jmp 0x402dd2
inc ebx
cmp dword [ebp - 0x44], ebx
jbe 0x402e50
mov dword [ebp - 0x4c], 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, [edi + esi*2]
mov dword [esp], eax
call sym._swprintf
add eax, esi
cmp dword [ebp - 0x60], ebx
je 0x402e50
mov edx, dword [ebp - 0x4c]
lea esi, [eax + 1]
add eax, eax
mov word [edi + eax], 0x2c
mov word [edi + eax + 2], 0
add edx, 3
cmp edx, 0x4c
jbe 0x402dc8
mov esi, dword [ebp - 0x50]
mov edx, edi
inc ebx
mov eax, esi
call sym._write_file
mov edx, str._r_n
mov eax, esi
call sym._write_file
xor esi, esi
mov edx, 2
cmp dword [ebp - 0x44], ebx
ja 0x402dd2
lea esi, [esi]
lea edi, [edi]
mov esi, edi
mov edi, dword [ebp - 0x5c]
jmp 0x402eb6
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x402e6d
shr eax, 1
dec eax
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x44]
lea ecx, [ebp - 0x1c]
mov eax, edi
call sym._escape_string
mov ebx, eax
mov eax, dword [ebp - 0x1c]
lea edx, [eax + 3]
mov dword [ebp - 0x44], edx
lea eax, [edx + edx]
mov dword [esp], eax
mov eax, dword [ebp - 0x6c]
call eax
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edx
mov esi, eax
mov eax, 0x40910e
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._swprintf
mov eax, dword [ebp - 0x64]
mov dword [esp], ebx
call eax
mov eax, dword [ebp - 0x50]
mov edx, esi
call sym._write_file
mov eax, dword [ebp - 0x64]
mov dword [esp], esi
call eax
mov eax, dword [ebp - 0x50]
mov edx, 0x409156
call sym._write_file
inc dword [ebp - 0x54]
jmp 0x402c80
mov eax, dword [ebp - 0x48]
lea ebx, [eax + eax]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x3c], eax
jmp 0x402c80
mov dword [esp], 0x1e
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x6c]
test ebx, ebx
jne 0x403170
call eax
mov ecx, 0xf
mov edx, str.hex__x_:
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov ebx, eax
mov eax, 4
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sym._swprintf
mov eax, dword [ebp - 0x50]
mov edx, ebx
call sym._write_file
mov eax, dword [ebp - 0x64]
mov dword [esp], ebx
call eax
mov eax, dword [ebp - 0x50]
mov edx, 0x409156
call sym._write_file
inc dword [ebp - 0x54]
jmp 0x402c80
mov edx, dword [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x3c]
call sym._escape_string
mov ecx, dword [ebp - 0x1c]
lea edx, [ecx + 4]
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x4c], eax
lea eax, [edx + edx]
mov dword [esp], eax
call ecx
mov edx, dword [ebp - 0x5c]
mov dword [esp + 4], edx
mov esi, eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov eax, 0x409102
mov dword [esp + 8], eax
call sym._swprintf
mov edx, esi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x50]
call sym._write_file
mov dword [esp], esi
mov esi, dword [ebp - 0x64]
call esi
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call esi
jmp 0x402d40
mov dword [esp], edi
mov edi, dword [ebp - 0x64]
call edi
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x6c]
mov dword [esp], 0x202
call eax
mov ebx, eax
mov eax, dword [ebp - 0x68]
cmp word [eax], 0
je 0x4031b6
nop
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x403010
mov edx, dword [ebp - 0x68]
sub eax, edx
sar eax, 1
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov edi, dword [ebp - 0x58]
or eax, 0x20019
mov dword [ebp - 0x44], eax
mov dword [esp + 8], ebx
xor eax, eax
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
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 0x4030f8
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
call sym._build_subkey_path
mov dword [esp + 4], ebx
mov dword [esp], edi
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
call sym._RegOpenKeyExW_20
mov ecx, dword [ebp - 0x3c]
sub esp, 0x14
test eax, eax
je 0x4030d0
mov dword [esp], ecx
mov eax, dword [ebp - 0x64]
inc esi
call eax
jmp 0x403033
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 0x4030be
mov dword [esp], ebx
mov eax, dword [ebp - 0x64]
call eax
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x1e
mov eax, dword [ebp - 0x6c]
call eax
mov dword [esp + 0xc], ebx
mov edx, eax
mov eax, str.hex__x_:
mov dword [esp + 8], eax
mov eax, 0xf
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x4c], edx
call sym._swprintf
mov edx, dword [ebp - 0x4c]
mov ebx, eax
mov eax, dword [ebp - 0x50]
call sym._write_file
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x64]
mov dword [esp], edx
call eax
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x402ec8
lea edx, [ebx + esi]
jmp 0x402d9c
call eax
mov edx, str.dword:_08x
mov ecx, 0xf
mov esi, eax
mov eax, dword [edi]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 0xc], eax
call sym._swprintf
jmp 0x402eb6
mov dword [esp], 0xe
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x6c], eax
call eax
mov ebx, eax
mov eax, 7
jmp 0x402c13
mov dword [ebp - 0x40], 0
jmp 0x403023