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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
je 0x4027e5
mov dword [ebp - 0x10], 0x104
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0x412c34
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4025b5
xor eax, eax
jmp 0x402d9f
cmp dword [ebp + 0xc], 2
je 0x4025c5
cmp dword [ebp + 0xc], 3
jne 0x402743
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24c], ecx
cmp dword [ebp - 0x24c], 2
je 0x4025e5
cmp dword [ebp - 0x24c], 3
je 0x402650
jmp 0x4026b9
mov dword [ebp - 0x10], 4
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x412c58
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402621
mov edx, dword [ebp - 0x14]
and edx, 2
test edx, edx
je 0x402621
mov dword [ebp - 0x250], 1
jmp 0x40262b
mov dword [ebp - 0x250], 0
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40264e
push 0x412c70
lea ecx, [ebp - 0x11c]
push ecx
call fcn.00408170
add esp, 8
jmp 0x4026b9
mov dword [ebp - 0x10], 4
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x412c84
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40268c
mov edx, dword [ebp - 0x14]
and edx, 2
test edx, edx
je 0x40268c
mov dword [ebp - 0x254], 1
jmp 0x402696
mov dword [ebp - 0x254], 0
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4026b9
push 0x412c98
lea ecx, [ebp - 0x11c]
push ecx
call fcn.00408170
add esp, 8
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x258], edx
cmp dword [ebp - 0x258], 0
je 0x4026df
cmp dword [ebp - 0x258], 1
je 0x4026e8
cmp dword [ebp - 0x258], 2
je 0x4026f1
jmp 0x40273e
mov dword [ebp - 8], 0
jmp 0x40273e
mov dword [ebp - 8], 1
jmp 0x40273e
mov dword [ebp - 0x10], 0x104
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0
lea edx, [ebp - 0x11c]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40272b
cmp dword [ebp - 0x10], 1
jbe 0x40272b
mov dword [ebp - 0x25c], 1
jmp 0x402735
mov dword [ebp - 0x25c], 0
mov ecx, dword [ebp - 0x25c]
mov dword [ebp - 8], ecx
jmp 0x4027ce
cmp dword [ebp + 0xc], 4
jne 0x4027a7
mov dword [ebp - 0x10], 4
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x412cb4
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402781
cmp dword [ebp - 0x14], 0
je 0x402781
mov dword [ebp - 0x260], 1
jmp 0x40278b
mov dword [ebp - 0x260], 0
mov edx, dword [ebp - 0x260]
mov dword [ebp - 8], edx
push 0x412ccc
mov eax, dword [ebp + 8]
push eax
call fcn.00408170
add esp, 8
jmp 0x4027ce
cmp dword [ebp + 0xc], 1
jne 0x4027c7
mov dword [ebp - 8], 1
push 0x412cd0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00408170
add esp, 8
jmp 0x4027ce
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
jne 0x4027e5
xor eax, eax
jmp 0x402d9f
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x264], 1
je 0x402802
cmp dword [ebp - 0x264], 4
je 0x402802
jmp 0x40282a
lea ecx, [ebp - 0xc]
push ecx
push 0x20019
push 0
push 0x412cd4
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x402828
xor eax, eax
jmp 0x402d9f
jmp 0x402850
lea edx, [ebp - 0xc]
push edx
push 0x20019
push 0
push 0x412d08
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x402850
xor eax, eax
jmp 0x402d9f
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402d8b
mov dword [ebp - 0x130], 0
jmp 0x40288c
mov eax, dword [ebp - 0x130]
add eax, 1
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x120], 0xa
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x120]
push ecx
lea edx, [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0x130]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x402d6a
lea edx, [ebp - 0x244]
push edx
push 0x20019
push 0
lea eax, [ebp - 0x12c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402933
lea edx, [ebp - 0x138]
push edx
lea eax, [ebp - 0x240]
push eax
push 0
push 0
push 0x412d40
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402933
mov dword [ebp - 0x268], 1
jmp 0x40293d
mov dword [ebp - 0x268], 0
mov edx, dword [ebp - 0x268]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
je 0x40298c
mov eax, dword [ebp - 0x240]
and eax, 0xffff
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x17c], eax
mov eax, dword [ebp - 0x240]
shr eax, 0x10
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x180], eax
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x4029e0
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x178]
push eax
push 0
push 0
push 0x412d4c
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4029e0
mov dword [ebp - 0x26c], 1
jmp 0x4029ea
mov dword [ebp - 0x26c], 0
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 8], edx
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402a47
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x1ac]
push eax
push 0
push 0
push 0x412d58
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402a47
mov dword [ebp - 0x270], 1
jmp 0x402a51
mov dword [ebp - 0x270], 0
mov edx, dword [ebp - 0x270]
mov dword [ebp - 8], edx
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402aae
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x1b8]
push eax
push 0
push 0
push 0x412d6c
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402aae
mov dword [ebp - 0x274], 1
jmp 0x402ab8
mov dword [ebp - 0x274], 0
mov edx, dword [ebp - 0x274]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x130]
imul eax, eax, 0xbc
mov ecx, dword [ebp + 8]
mov dword [ecx + eax + 0x1b0], 0
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx + 0x1ac]
and ecx, 4
test ecx, ecx
je 0x402b5f
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402b4c
lea edx, [ebp - 0x138]
push edx
mov eax, dword [ebp - 0x130]
imul eax, eax, 0xbc
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x1b0]
push edx
push 0
push 0
push 0x412d78
mov eax, dword [ebp - 0x244]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402b4c
mov dword [ebp - 0x278], 1
jmp 0x402b56
mov dword [ebp - 0x278], 0
mov ecx, dword [ebp - 0x278]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
mov dword [eax + edx + 0x1b4], 0
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x1ac]
and eax, 1
test eax, eax
je 0x402bfd
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402bea
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x1b4]
push ecx
push 0
push 0
push 0x412d88
mov edx, dword [ebp - 0x244]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402bea
mov dword [ebp - 0x27c], 1
jmp 0x402bf4
mov dword [ebp - 0x27c], 0
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x1b8]
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x134], 0
jmp 0x402c42
mov ecx, dword [ebp - 0x248]
shr ecx, 1
mov dword [ebp - 0x248], ecx
mov edx, dword [ebp - 0x134]
add edx, 1
mov dword [ebp - 0x134], edx
cmp dword [ebp - 0x248], 0
je 0x402d1d
mov eax, dword [ebp - 0x130]
imul eax, eax, 0xbc
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x110]
mov eax, dword [ebp - 0x134]
mov dword [edx + eax*4 + 0xac], 0
mov ecx, dword [ebp - 0x248]
and ecx, 1
test ecx, ecx
je 0x402d18
mov edx, dword [ebp - 0x134]
push edx
push 0x412d98
lea eax, [ebp - 0x23c]
push eax
call fcn.0040811b
add esp, 0xc
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402d05
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x110]
mov edx, dword [ebp - 0x134]
lea eax, [ecx + edx*4 + 0xac]
push eax
push 0
push 0
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x244]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402d05
mov dword [ebp - 0x280], 1
jmp 0x402d0f
mov dword [ebp - 0x280], 0
mov eax, dword [ebp - 0x280]
mov dword [ebp - 8], eax
jmp 0x402c25
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
jne 0x402d32
jmp 0x402d6a
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
mov word [eax + edx + 0x134], 0x9c
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x138], 0x5c0000
jmp 0x40287d
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
je 0x402d89
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x130]
mov dword [ecx + 0x108], edx
jmp 0x402d92
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret