Function at 0x10005850
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Write file on windows

Disassembly:
sub esp, 0x258
mov al, byte [0x10096b74]
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x60], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x61]
lea edx, [esp + 0x58]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x4c]
mov dword [esp + 0x40], 0x104
stosb byte es:[edi], al
push ecx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x40]
push eax
lea edx, [esp + 0x40]
push ecx
lea eax, [esp + 0x64]
push edx
lea ecx, [esp + 0x70]
push eax
lea edx, [esp + 0x60]
push ecx
push edx
mov edx, dword [esp + 0x290]
lea eax, [esp + 0x60]
push 0
lea ecx, [esp + 0x84]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x10005ad9
mov ebx, dword [esp + 0x26c]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
xor edi, edi
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x274]
push 0
push 0
push 0
lea edx, [esp + 0x174]
push ecx
push edx
push edi
push eax
mov dword [esp + 0x4c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov esi, eax
test esi, esi
jne 0x10005946
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x24]
mov dword [esp + 0x1c], eax
push eax
push edx
lea eax, [esp + 0x1c]
push 0xc
push eax
push ebx
mov dword [esp + 0x28], 0x11
mov dword [esp + 0x2c], ecx
call ebp
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x24]
push esi
push ecx
lea eax, [esp + 0x16c]
push edx
push eax
push ebx
call ebp
inc edi
test esi, esi
je 0x100058d7
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov esi, dword [sym.imp.MSVCRT.dll_malloc]
inc edx
lea eax, [ecx + 1]
mov dword [esp + 0x10], edx
push eax
mov dword [esp + 0x24], eax
call esi
mov edi, eax
add esp, 4
test edi, edi
je 0x10005ad9
mov eax, dword [esp + 0x10]
push eax
call esi
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x44], esi
jne 0x100059a0
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x258
ret 8
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10005ac6
mov dword [esp + 0x28], 0
jbe 0x10005ac6
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
inc ecx
lea eax, [esp + 0x10]
mov dword [esp + 0x20], ecx
inc edx
push eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x40]
mov dword [esp + 0x14], edx
push esi
push ecx
mov ecx, dword [esp + 0x27c]
lea edx, [esp + 0x2c]
push 0
push edx
push edi
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x10005ab1
mov eax, dword [esp + 0x3c]
cmp eax, 0xb
ja case.0x10005a03.8
jmp dword [eax*4 + 0x10005ae8]
mov dword [esp + 0x14], 3
jmp 0x10005a6c
mov dword [esp + 0x14], 4
jmp 0x10005a6c
mov dword [esp + 0x14], 5
jmp 0x10005a6c
mov dword [esp + 0x14], 2
jmp 0x10005a6c
mov dword [esp + 0x14], 6
jmp 0x10005a6c
mov dword [esp + 0x14], 7
jmp 0x10005a6c
mov dword [esp + 0x14], 0
jmp 0x10005a6c
mov dword [esp + 0x14], 0xb
jmp 0x10005a6c
mov dword [esp + 0x14], 1
jmp 0x10005a6c
mov dword [esp + 0x14], 0x12
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x24]
mov dword [esp + 0x18], edx
push 0
push ecx
lea edx, [esp + 0x1c]
push 0xc
push edx
push ebx
mov dword [esp + 0x30], eax
call ebp
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10005aa1
lea ecx, [esp + 0x24]
push 0
push ecx
push eax
push edi
push ebx
call ebp
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x24]
push 0
push edx
push eax
push esi
push ebx
call ebp
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jb 0x100059ba
mov esi, dword [sym.imp.MSVCRT.dll_free]
push edi
call esi
mov ecx, dword [esp + 0x48]
push ecx
call esi
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x258
ret 8