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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x407030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x224]
push eax
mov esi, edx
mov dword [0x407394], 0
push 0x407394
mov edx, dword [edi + 0xc]
mov ecx, esi
push 7
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x224], 0
call fcn.00403ea0
mov ebx, dword [ebp - 0x224]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x218]
push eax
push 0x20019
push 0
push dword [edi + 0xc]
push esi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x403dce
xor esi, esi
lea ecx, [ecx]
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 - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x4035ff
mov eax, dword [ebp - 0x21c]
lea ebx, [ebx + eax*2]
add ebx, 2
inc esi
test ecx, ecx
je 0x4035c0
test ebx, ebx
je 0x403788
cmp esi, 1
jbe 0x403788
lea eax, [ebx + 2]
push eax
push 0
push dword [0x407378]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov ecx, eax
mov dword [ebp - 0x210], ecx
test ecx, ecx
je 0x40378a
cmp dword [ebp - 0x220], 0
mov ebx, ecx
mov dword [ebp - 0x228], ebx
jne 0x4036d0
cmp dword [ebp - 0x224], 2
jb 0x4036d0
mov esi, dword [0x407394]
test esi, esi
je 0x4036d0
cmp word [esi], 0
je 0x4036d0
mov ecx, esi
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403670
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 0x403696
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 0x4036b0
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], ax
jne 0x403665
mov dword [ebp - 0x228], ebx
mov edi, dword [ebp - 0x228]
xor esi, esi
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 - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
mov ebx, eax
test ebx, ebx
jne 0x403747
lea ecx, [ebp - 0x208]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403714
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x208]
push eax
push edi
call sub.api_ms_win_core_crt_l1_1_0.dll_memcpy
mov eax, dword [ebp - 0x21c]
add esp, 0xc
lea edi, [edi + eax*2]
add edi, 2
inc esi
test ebx, ebx
je 0x4036d8
xor eax, eax
mov word [edi], ax
mov eax, dword [0x407394]
mov edi, dword [ebp - 0x214]
test eax, eax
je 0x40376f
push eax
push 0
push dword [0x407378]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov ecx, dword [ebp - 0x210]
mov eax, ecx
mov dword [0x407394], eax
mov dword [ebp - 0x220], 0
jmp 0x40378f
xor ecx, ecx
mov eax, dword [0x407394]
test eax, eax
je 0x4037a6
cmp dword [ebp - 0x224], 2
jae 0x4037a0
test ecx, ecx
je 0x4037b0
cmp word [eax], 0
jne 0x4037b0
mov dword [ebp - 0x220], 0xd
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401500
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403800
cmp dword [ebp - 0x214], 4
je 0x4037f7
mov dword [ebp - 0x20c], eax
jmp 0x403800
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x14], eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401538
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403854
cmp dword [ebp - 0x214], 4
je 0x403847
mov dword [ebp - 0x20c], eax
jmp 0x403854
cmp dword [ebp - 0x20c], 0
je 0x403854
or dword [edi + 0x58], 2
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401578
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x4038a8
cmp dword [ebp - 0x214], 4
je 0x40389b
mov dword [ebp - 0x20c], eax
jmp 0x4038a8
cmp dword [ebp - 0x20c], 0
je 0x4038a8
or dword [edi + 0x58], 0x10
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x4015d0
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x4038fc
cmp dword [ebp - 0x214], 4
je 0x4038ef
mov dword [ebp - 0x20c], eax
jmp 0x4038fc
cmp dword [ebp - 0x20c], 0
je 0x4038fc
or dword [edi + 0x58], 0x20
cmp dword [edi + 0x14], 0
je 0x403b61
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401620
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ecx, eax
test ecx, ecx
jne 0x403954
cmp dword [ebp - 0x214], 4
je 0x403954
mov dword [ebp - 0x20c], eax
mov ecx, 0x70c
jmp 0x40395a
mov eax, dword [ebp - 0x20c]
test ecx, ecx
jne 0x403963
mov dword [edi + 0x18], eax
jmp 0x40396a
mov dword [edi + 0x18], 4
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401648
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ecx, eax
test ecx, ecx
jne 0x4039b8
cmp dword [ebp - 0x214], 4
je 0x4039b8
mov dword [ebp - 0x20c], eax
mov ecx, 0x70c
jmp 0x4039be
mov eax, dword [ebp - 0x20c]
test ecx, ecx
jne 0x4039c7
mov dword [edi + 0x1c], eax
jmp 0x4039ce
mov dword [edi + 0x1c], 2
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401670
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ecx, eax
test ecx, ecx
jne 0x403a1c
cmp dword [ebp - 0x214], 4
je 0x403a1c
mov dword [ebp - 0x20c], eax
mov ecx, 0x70c
jmp 0x403a22
mov eax, dword [ebp - 0x20c]
test ecx, ecx
jne 0x403a2b
mov dword [edi + 0x20], eax
jmp 0x403a32
mov dword [edi + 0x20], 0x3000
mov ecx, dword [ebp - 0x218]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
mov edx, 0x4016a8
push eax
push 1
call fcn.00403ea0
test eax, eax
jne 0x403a99
mov ebx, dword [ebp - 0x210]
lea esi, [edi + 0x24]
push esi
push ebx
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CLSIDFromString]
test eax, eax
jns 0x403a8a
mov eax, dword [0x4014d0]
mov dword [esi], eax
mov eax, dword [0x4014d4]
mov dword [esi + 4], eax
mov eax, dword [0x4014d8]
mov dword [esi + 8], eax
mov eax, dword [0x4014dc]
mov dword [esi + 0xc], eax
push ebx
push 0
push dword [0x407378]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x4016dc
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ecx, eax
test ecx, ecx
jne 0x403ae7
cmp dword [ebp - 0x214], 4
je 0x403ae7
mov dword [ebp - 0x20c], eax
mov ecx, 0x70c
jmp 0x403aed
mov eax, dword [ebp - 0x20c]
test ecx, ecx
jne 0x403af6
mov dword [edi + 0x34], eax
jmp 0x403afd
mov dword [edi + 0x34], 0xffff
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x40170c
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ecx, eax
test ecx, ecx
jne 0x403b4b
cmp dword [ebp - 0x214], 4
je 0x403b4b
mov dword [ebp - 0x20c], eax
mov ecx, 0x70c
jmp 0x403b51
mov eax, dword [ebp - 0x20c]
test ecx, ecx
jne 0x403b5a
mov dword [edi + 0x38], eax
jmp 0x403b61
mov dword [edi + 0x38], 0xffff
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x40172c
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403bb1
cmp dword [ebp - 0x214], 4
je 0x403ba8
mov dword [ebp - 0x20c], eax
jmp 0x403bb1
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x3c], eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401754
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403c08
cmp dword [ebp - 0x214], 4
je 0x403bf8
mov dword [ebp - 0x20c], eax
jmp 0x403c08
cmp dword [ebp - 0x20c], 0
jne 0x403c08
mov dword [edi + 0x40], 1
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x401784
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403c5d
cmp dword [ebp - 0x214], 4
je 0x403c4f
mov dword [ebp - 0x20c], eax
jmp 0x403c5d
xor eax, eax
cmp dword [ebp - 0x20c], eax
setne al
mov dword [edi + 0x44], eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x4017a4
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403cb1
cmp dword [ebp - 0x214], 4
je 0x403ca4
mov dword [ebp - 0x20c], eax
jmp 0x403cb1
cmp dword [ebp - 0x20c], 0
je 0x403cb1
or dword [edi + 0x58], 8
xor esi, esi
call fcn.004046a0
xor ecx, ecx
call fcn.0040525f
test eax, eax
je 0x403cc6
mov esi, dword [edi + 0x48]
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x4017bc
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403d0f
cmp dword [ebp - 0x214], 4
je 0x403e67
mov dword [ebp - 0x20c], eax
test esi, esi
je 0x403d1a
mov dword [edi + 0x4c], 1
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x4017e0
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403d63
cmp dword [ebp - 0x214], 4
je 0x403e75
mov dword [ebp - 0x20c], eax
test esi, esi
je 0x403d6e
mov dword [edi + 0x50], 1
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x40180c
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x403db7
cmp dword [ebp - 0x214], 4
je 0x403e83
mov dword [ebp - 0x20c], eax
test esi, esi
je 0x403dc2
mov dword [edi + 0x54], 1
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea eax, [ebp - 0x22c]
push eax
push 0x20019
push 0
push 0x401838
push 0x80000002
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x403e4e
mov ecx, dword [ebp - 0x22c]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
mov edx, 0x4018d4
push eax
push 1
call fcn.00403ea0
test eax, eax
jne 0x403e42
mov esi, dword [ebp - 0x210]
push 1
push 0xffffffffffffffff
push esi
push 0xffffffffffffffff
push dword [edi + 0xc]
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_CompareStringOrdinal]
cmp eax, 2
jne 0x403e33
or dword [edi + 0x58], 4
push esi
push 0
push dword [0x407378]
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
push dword [ebp - 0x22c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x220]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00405030
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x4c], eax
jmp 0x403d1a
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x50], eax
jmp 0x403d6e
mov eax, dword [ebp - 0x20c]
mov dword [edi + 0x54], eax
jmp 0x403dc2