Function at 0x1000bd50
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
push str.RegOpenKeyExA
mov ebx, ecx
push str.ADVAPI32.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push str.RegQueryInfoKeyA
push str.ADVAPI32.dll
mov ebp, eax
call esi
push eax
call edi
mov edx, dword [ebx + 4]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x38]
lea ecx, [ebx + 8]
push eax
push 0xf003f
push 0
push ecx
push edx
mov dword [esp + 0x44], 0
call ebp
test eax, eax
jne 0x1000bffa
push eax
push eax
lea eax, [esp + 0x28]
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
mov edx, dword [esp + 0x4c]
lea eax, [esp + 0x58]
push 0
lea ecx, [esp + 0x60]
push eax
push ecx
push 0
push 0
push 0
push edx
call dword [esp + 0x5c]
test eax, eax
je 0x1000bde9
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x48
ret
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x1000bffa
mov eax, dword [esp + 0x20]
test eax, eax
jbe 0x1000bffa
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x1000bffa
push str.LocalReAlloc
push str.KERNEL32.dll
call esi
push eax
call edi
push str.LocalAlloc
push str.KERNEL32.dll
mov dword [esp + 0x48], eax
call esi
push eax
call edi
push str.RegEnumValueA
push str.ADVAPI32.dll
mov ebp, eax
call esi
push eax
call edi
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
lea ebx, [eax + 1]
lea eax, [ecx + 0x64]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x54], ebx
lea ebx, [ebx + eax + 1]
imul ebx, ecx
add ebx, 0x16
mov dword [esp + 0x10], eax
push ebx
push 0x40
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], eax
call ebp
mov ecx, ebx
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
mov dword [esp + 0x30], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x50]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x4c]
lea eax, [esi + 1]
mov byte [esi], 0x8d
mov edi, dword [sym.imp.MSVCRT.dll_malloc]
mov dword [eax], ecx
mov ecx, dword [esp + 0x54]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov edx, dword [esp + 0x10]
push edx
call edi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
push eax
call edi
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x24]
add esp, 8
lea ebp, [esi + 0xd]
test eax, eax
mov dword [esp + 0x24], 0
jbe 0x1000bfd3
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x28]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x2c]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
xor eax, eax
mov esi, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
inc eax
mov edi, dword [esp + 0x28]
mov dword [esp + 0x14], eax
add ecx, 0x64
lea eax, [esp + 0x14]
mov dword [esp + 0x10], ecx
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x1c]
push edx
push ecx
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x1c]
push 0
push edx
push edi
push eax
push ecx
call dword [esp + 0x5c]
cmp dword [esp + 0x18], 1
jne 0x1000bf59
mov byte [ebp], 0
cmp dword [esp + 0x18], 4
jne 0x1000bf64
mov byte [ebp], 1
cmp dword [esp + 0x18], 3
jne 0x1000bf6f
mov byte [ebp], 2
cmp dword [esp + 0x18], 2
jne 0x1000bf7a
mov byte [ebp], 3
or ecx, 0xffffffff
xor eax, eax
inc ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x54]
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x50]
mov ecx, eax
add ebp, esi
mov esi, dword [esp + 0x2c]
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
mov eax, dword [esp + 0x24]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jb 0x1000bee3
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov edi, dword [sym.imp.MSVCRT.dll_free]
push eax
call edi
mov ecx, dword [esp + 0x30]
push ecx
call edi
add esp, 8
push 0x42
push ebx
push esi
call dword [esp + 0x4c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
mov eax, dword [esp + 0x30]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret