Function at 0x40bc8d
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
sub esp, 0x104
lea ebp, [esp - 4]
mov eax, dword [0x4541c0]
xor eax, ebp
mov dword [ebp + 0x104], eax
push 0x7c
mov eax, 0x4416d4
call fcn.0042baa9
mov edi, 0x445054
lea eax, [ebp - 0x14]
push edi
xor ebx, ebx
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x5c], 4
call fcn.00408331
mov eax, dword [eax]
pop ecx
pop ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
mov esi, reloc.WS2_32.dll_bind
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov dword [ebp - 0x18], eax
call fcn.004012b7
cmp dword [ebp - 0x18], ebx
je 0x40bd19
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.00408331
mov eax, dword [eax]
pop ecx
pop ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004012b7
lea eax, [ebp - 0x14]
push 0x445044
push eax
call fcn.00408331
mov eax, dword [eax]
pop ecx
pop ecx
lea ecx, [ebp - 0x5c]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push ebx
push ebx
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp - 0x14]
test eax, eax
setne byte [ebp - 0xd]
add ecx, 0xfffffff0
call fcn.004012b7
cmp byte [ebp - 0xd], bl
je 0x40bd58
mov dword [ebp - 0x1c], ebx
cmp dword [ebp - 0x1c], ebx
jne 0x40bf33
lea eax, [ebp - 0x14]
push 0x444fc0
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x60], 0x104
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x38], ebx
call fcn.00408331
mov eax, dword [eax]
pop ecx
pop ecx
lea ecx, [ebp - 0x18]
push ecx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov ecx, dword [ebp - 0x14]
neg eax
sbb al, al
inc al
add ecx, 0xfffffff0
mov byte [ebp - 0xd], al
call fcn.004012b7
cmp byte [ebp - 0xd], bl
je 0x40bf33
push 0x103
lea eax, [ebp + 1]
push ebx
push eax
mov byte [ebp], bl
call fcn.0042bc20
add esp, 0xc
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x48]
push eax
push ebx
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x40bf2a
push 0xffffffffffffffff
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040aac6
push ebx
push ebx
push ebx
push 3
lea ecx, [ebp - 0x30]
call fcn.0040a97a
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x28]
sbb dword [ebp - 0x24], eax
lea eax, [ebp - 0x78]
push eax
call fcn.0040ab64
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x78]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_TzSpecificLocalTimeToSystemTime]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x88]
push eax
call dword [0x4c64a0]
lea eax, [ebp - 0x50]
push 0x444fa8
push eax
call fcn.00408331
pop ecx
pop ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [ebp - 0x50]
add ecx, 0xfffffff0
mov dword [ebp - 0x14], eax
call fcn.004012b7
cmp dword [ebp - 0x14], ebx
je 0x40bf2a
lea eax, [ebp - 0x2c]
push 0x444f7c
push eax
call fcn.00408331
pop ecx
pop ecx
push dword [eax]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov dword [0x4c6428], eax
call fcn.004012b7
mov eax, dword [0x4c6428]
cmp eax, ebx
je 0x40bf2a
push 8
lea ecx, [ebp - 0x58]
push ecx
push ebx
push dword [ebp - 0x18]
call eax
test eax, eax
jne 0x40bf2a
lea eax, [ebp - 0x44]
push 0x445044
push eax
mov dword [ebp - 0x1c], 1
call fcn.00408331
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
push edi
push eax
mov dword [ebp - 4], ebx
call fcn.00408331
add esp, 0x10
push 4
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x2c]
push 4
push dword [ecx]
mov byte [ebp - 4], 1
push dword [eax]
push esi
call dword [0x4c64b4]
mov ecx, dword [ebp - 0x3c]
add ecx, 0xfffffff0
call fcn.004012b7
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.004012b7
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x104]
xor ecx, ebp
call fcn.0042ba9a
add ebp, 0x108
leave
ret