Function at 0x402f40
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x408028]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x220]
push eax
xor ebx, ebx
mov dword [ebp - 0x210], 0
mov esi, edx
mov dword [0x4083ac], ebx
mov edx, dword [edi + 0xc]
mov ecx, esi
push 0x4083ac
push 7
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x220], ebx
call fcn.004036e0
mov dword [ebp - 0x214], eax
mov eax, dword [ebp - 0x220]
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x210]
push eax
push 0x20019
push ebx
push dword [edi + 0xc]
push esi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x403497
mov ebx, dword [ebp - 0x218]
xor esi, esi
lea ebx, [ebx]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0x101
push eax
lea eax, [ebp - 0x208]
push eax
push esi
push dword [ebp - 0x210]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
inc esi
test eax, eax
jne 0x403030
mov eax, dword [ebp - 0x21c]
lea ebx, [ebx + eax*2]
add ebx, 2
jmp 0x402ff0
test ebx, ebx
je 0x403199
cmp esi, 1
jbe 0x403199
lea eax, [ebx + 2]
push eax
push 0
push dword [0x408394]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov edx, eax
mov dword [ebp - 0x218], edx
test edx, edx
je 0x40319b
cmp dword [ebp - 0x214], 0
mov ebx, edx
jne 0x4030ea
cmp dword [ebp - 0x220], 2
jb 0x4030ea
mov esi, dword [0x4083ac]
test esi, esi
je 0x4030ea
cmp word [esi], 0
je 0x4030ea
mov ecx, esi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403090
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push ebx
call sub.api_ms_win_core_crt_l1_1_0.dll_memcpy
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4030b6
sub ecx, edx
sar ecx, 1
lea ebx, [ebx + ecx*2]
mov ecx, esi
add ebx, 2
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4030d0
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], ax
jne 0x403087
xor esi, esi
lea esp, [esp]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0x101
push eax
lea eax, [ebp - 0x208]
push eax
push esi
push dword [ebp - 0x210]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
inc esi
test eax, eax
jne 0x403165
lea ecx, [ebp - 0x208]
lea edx, [ecx + 2]
jmp 0x403130
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403130
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x208]
push eax
push ebx
call sub.api_ms_win_core_crt_l1_1_0.dll_memcpy
mov eax, dword [ebp - 0x21c]
add esp, 0xc
lea ebx, [ebx + eax*2]
add ebx, 2
jmp 0x4030f0
xor eax, eax
mov word [ebx], ax
mov eax, dword [0x4083ac]
test eax, eax
je 0x403182
push eax
push 0
push dword [0x408394]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov edx, dword [ebp - 0x218]
xor ecx, ecx
mov eax, edx
mov dword [ebp - 0x214], ecx
mov dword [0x4083ac], eax
jmp 0x4031a0
xor edx, edx
mov eax, dword [0x4083ac]
test eax, eax
je 0x4034ed
cmp dword [ebp - 0x220], 2
jae 0x4031b5
test edx, edx
je 0x4031bf
cmp word [eax], 0
je 0x4034ed
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x401668
call fcn.00403690
test eax, eax
jne 0x4031e3
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x14], eax
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x4016a0
call fcn.00403690
test eax, eax
jne 0x40320a
cmp dword [ebp - 0x20c], eax
je 0x40320a
or dword [edi + 0x5c], 2
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x4016e0
call fcn.00403690
test eax, eax
jne 0x403231
cmp dword [ebp - 0x20c], eax
je 0x403231
or dword [edi + 0x5c], 0x10
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x401738
call fcn.00403690
test eax, eax
jne 0x403258
cmp dword [ebp - 0x20c], eax
je 0x403258
or dword [edi + 0x5c], 0x20
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x401788
call fcn.00403690
test eax, eax
jne 0x40327f
cmp dword [ebp - 0x20c], eax
je 0x40327f
or dword [edi + 0x5c], 0x40
cmp dword [edi + 0x14], 0
je 0x4033c1
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x4017d8
call fcn.00403690
test eax, eax
jne 0x4032af
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x18], eax
jmp 0x4032b6
mov dword [edi + 0x18], 4
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x401800
call fcn.00403690
test eax, eax
jne 0x4032dc
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x1c], eax
jmp 0x4032e3
mov dword [edi + 0x1c], 2
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x401828
call fcn.00403690
test eax, eax
jne 0x403309
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x20], eax
jmp 0x403310
mov dword [edi + 0x20], 0x3000
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x22c]
mov edx, 0x401860
push eax
push 1
call fcn.004036e0
test eax, eax
jne 0x403367
lea esi, [edi + 0x24]
push esi
push dword [ebp - 0x22c]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CLSIDFromString]
test eax, eax
jns 0x403367
mov eax, dword [0x40148c]
mov dword [esi], eax
mov eax, dword [0x401490]
mov dword [esi + 4], eax
mov eax, dword [0x401494]
mov dword [esi + 8], eax
mov eax, dword [0x401498]
mov dword [esi + 0xc], eax
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x401894
call fcn.00403690
test eax, eax
jne 0x40338d
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x34], eax
jmp 0x403394
mov dword [edi + 0x34], 0xffff
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x4018c4
call fcn.00403690
test eax, eax
jne 0x4033ba
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x38], eax
jmp 0x4033c1
mov dword [edi + 0x38], 0xffff
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x4018e4
call fcn.00403690
test eax, eax
jne 0x4033e5
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x3c], eax
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x40190c
call fcn.00403690
test eax, eax
jne 0x40340f
cmp dword [ebp - 0x20c], eax
jne 0x40340f
mov dword [edi + 0x40], 1
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x40193c
call fcn.00403690
test eax, eax
jne 0x403436
cmp dword [ebp - 0x20c], eax
setne al
mov dword [edi + 0x44], eax
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x40195c
call fcn.00403690
test eax, eax
jne 0x40345d
cmp dword [ebp - 0x20c], eax
je 0x40345d
or dword [edi + 0x5c], 8
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x224]
mov edx, 0x401974
push eax
push 3
call fcn.004036e0
mov ebx, dword [ebp - 0x224]
test eax, eax
jne 0x4034e1
push ebx
call dword [sym.imp.ntdll.dll_RtlValidSecurityDescriptor]
test al, al
je 0x4034d7
mov dword [edi + 0x60], ebx
xor ebx, ebx
xor ecx, ecx
xor esi, esi
call fcn.004037b0
test eax, eax
je 0x4034a7
mov esi, dword [edi + 0x48]
mov ecx, dword [ebp - 0x210]
test ecx, ecx
je 0x4034f7
lea eax, [ebp - 0x20c]
mov edx, 0x4019a4
push eax
call fcn.00403690
mov ecx, dword [ebp - 0x210]
test eax, eax
jne 0x4034f7
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x4c], eax
jmp 0x403502
mov esi, 0xd
jmp 0x403609
cmp eax, 2
je 0x403497
mov esi, eax
jmp 0x403609
mov esi, 0xd
jmp 0x40364e
test esi, esi
je 0x403502
mov dword [edi + 0x4c], 1
test ecx, ecx
je 0x40352c
lea eax, [ebp - 0x20c]
mov edx, 0x4019c8
push eax
call fcn.00403690
mov ecx, dword [ebp - 0x210]
test eax, eax
jne 0x40352c
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x50], eax
jmp 0x403537
test esi, esi
je 0x403537
mov dword [edi + 0x50], 1
test ecx, ecx
je 0x403561
lea eax, [ebp - 0x20c]
mov edx, 0x4019f4
push eax
call fcn.00403690
mov ecx, dword [ebp - 0x210]
test eax, eax
jne 0x403561
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x54], eax
jmp 0x403568
mov dword [edi + 0x54], 2
test ecx, ecx
je 0x40358c
lea eax, [ebp - 0x20c]
mov edx, 0x401a24
push eax
call fcn.00403690
test eax, eax
jne 0x40358c
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x58], eax
jmp 0x403597
test esi, esi
je 0x403597
mov dword [edi + 0x58], 1
lea eax, [ebp - 0x230]
push eax
push 0x20019
push 0
push 0x401a50
push 0x80000002
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x403603
mov ecx, dword [ebp - 0x230]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x228]
mov edx, 0x401aec
push eax
push 1
call fcn.004036e0
test eax, eax
jne 0x403603
push 1
push 0xffffffffffffffff
push dword [ebp - 0x228]
push 0xffffffffffffffff
push dword [edi + 0xc]
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_CompareStringOrdinal]
mov esi, dword [ebp - 0x214]
cmp eax, 2
jne 0x403609
or dword [edi + 0x5c], 4
jmp 0x403609
mov esi, dword [ebp - 0x214]
test ebx, ebx
je 0x40361c
push ebx
push 0
push dword [0x408394]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x403635
push eax
push 0
push dword [0x408394]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x40364e
push eax
push 0
push dword [0x408394]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x40365f
push eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, dword [ebp - 0x230]
test eax, eax
je 0x403670
push eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405970
mov esp, ebp
pop ebp
ret 4