Function at 0x4587c0
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58ede0
mov eax, dword fs:[0]
push eax
mov eax, 0x2030
call fcn.00552760
mov eax, dword [0x5f0a00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ecx + 4], 0
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x2030], edx
mov dword [ebp - 0x2034], edi
mov dword [ebp - 0x201c], edi
mov dword [ebp - 0x2028], esi
je 0x458ac5
mov dword [ebp - 0x2020], 0
call fcn.0044c370
mov esi, eax
test esi, esi
je 0x458ab3
lea eax, [ebp - 0x203c]
push eax
lea eax, [ebp - 0x2020]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x2020]
mov dword [ebp - 0x202c], eax
test eax, eax
je 0x458ab3
mov esi, dword [0x5f0130]
mov dword [ebp - 0x2014], esi
lea ecx, [ebp - 0x2018]
mov dword [ebp - 4], 0
push ecx
push 0
lea ecx, [ebp - 0x2024]
mov dword [ebp - 0x2024], 0
push ecx
push 0
push dword [ebp - 0x2028]
mov dword [ebp - 0x2018], 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
or ebx, 0xffffffff
mov dword [ebp - 0x201c], eax
test eax, eax
jne 0x458a51
mov edi, dword [ebp - 0x2018]
lea ebx, [esi - 0xc]
mov ecx, dword [ebx]
shr edi, 1
cmp ecx, 1
jg 0x4588e5
cmp edi, dword [ebx + 8]
jle 0x45891b
cmp edi, dword [ebx + 4]
mov eax, dword [0x5f012c]
cmovl edi, dword [ebx + 4]
cmp ecx, 1
jg 0x4589a8
cmp ebx, eax
je 0x4589a8
test edi, edi
jne 0x458964
test eax, eax
jne 0x45899a
mov eax, dword [0x5f0130]
mov dword [ebp - 0x2014], eax
xor esi, esi
lea eax, [ebp - 0x2018]
push eax
push esi
lea eax, [ebp - 0x2024]
push eax
push 0
push dword [ebp - 0x2028]
push dword [ebp - 0x202c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [ebp - 0x2014]
mov dword [ebp - 0x201c], eax
call fcn.0040e9e0
mov esi, dword [ebp - 0x2014]
test esi, esi
jne 0x458a2b
xor ecx, ecx
jmp 0x458a3f
lea eax, [edi*2 + 0xe]
push eax
test ebx, ebx
jne 0x45897a
call fcn.00440020
add esp, 4
jmp 0x458983
push ebx
call fcn.00440030
add esp, 8
test eax, eax
je 0x45890e
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov word [eax + edi*2 + 0xc], cx
lea esi, [eax + 0xc]
mov dword [ebp - 0x2014], esi
jmp 0x45891b
test edi, edi
jne 0x4589b6
test eax, eax
je 0x458919
jmp 0x4589e1
lea eax, [edi*2 + 0xe]
push eax
call fcn.00440020
add esp, 4
test eax, eax
je 0x458919
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov word [eax + edi*2 + 0xc], cx
cmp dword [ebx + 4], edi
lea ecx, [eax + 0xc]
mov dword [ebp - 0x2014], ecx
cmovl edi, dword [ebx + 4]
lea eax, [edi*2 + 2]
push eax
push esi
push ecx
call fcn.005577f0
add esp, 0xc
cmp ebx, dword [0x5f012c]
je 0x458a20
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x458a20
push ebx
call fcn.00408c50
add esp, 4
mov esi, dword [ebp - 0x2014]
jmp 0x45891b
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x458a30
sub ecx, edx
sar ecx, 1
mov edi, dword [ebp - 0x2034]
xor eax, eax
mov dword [esi - 8], ecx
or ebx, 0xffffffff
mov word [esi + ecx*2], ax
push dword [ebp - 0x202c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x201c], 0
mov ecx, edi
jne 0x458a77
push esi
call fcn.0040db80
mov dword [ebp - 4], 1
jmp 0x458a89
push dword [ebp - 0x2030]
call fcn.0040db80
mov dword [ebp - 4], 2
add esi, 0xfffffff4
cmp esi, dword [0x5f012c]
je 0x458b48
lock xadd dword [esi], ebx
dec ebx
test ebx, ebx
jg 0x458b48
push esi
call fcn.00408c50
add esp, 4
jmp 0x458b48
push dword [ebp - 0x2030]
mov ecx, edi
call fcn.0040db80
jmp 0x458b48
push dword [ecx + 8]
lea eax, [ebp - 0x2010]
test edx, edx
push 0x1000
push eax
mov eax, 0x59a304
cmovne eax, edx
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [0x5f0130]
lea esi, [ebp - 0x2010]
mov dword [edi], eax
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x458af7
sub esi, ecx
sar esi, 1
je 0x458b48
lea eax, [esi*2 + 0xe]
push eax
call fcn.00440020
add esp, 4
test eax, eax
je 0x458b48
mov dword [eax], 1
xor ecx, ecx
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov word [eax + esi*2 + 0xc], cx
lea ecx, [eax + 0xc]
lea eax, [esi + esi]
mov dword [edi], ecx
push eax
lea eax, [ebp - 0x2010]
push eax
push ecx
call fcn.005577f0
add esp, 0xc
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00551e44
mov esp, ebp
pop ebp
ret 0x10