Function at 0x40e240
Capabilities:
Check if file exists
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4aa4c2
mov eax, dword fs:[0]
push eax
sub esp, 0x844
mov eax, dword [0x4ef6d4]
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
mov ebx, dword [ebp + 8]
mov eax, 0x4f4ab0
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov dword [ebp - 0x81c], ebx
mov dword [ebp - 0x840], edx
mov dword [ebp - 0x82c], eax
mov dword [ebp - 0x844], 0
nop word [eax + eax]
mov eax, dword [eax + 0xc]
test dword [edx], eax
jne 0x40e8df
xor eax, eax
mov dword [ebp - 0x838], eax
mov dword [ebp - 4], eax
call fcn.004080e0
test eax, eax
je 0x40e91f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x820], edi
mov dword [ebp - 0x834], 0x104
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
mov dword [ebp - 4], 1
jge 0x40e30e
push 0x104
lea ecx, [ebp - 0x820]
call fcn.00408b10
mov edi, dword [ebp - 0x820]
cmp dword [edi - 8], 0x104
jl 0x40e929
xor eax, eax
mov dword [edi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [edi + 0x208], ax
lea eax, [ebp - 0x834]
push eax
push edi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push dword [edi - 8]
mov ebx, eax
push edi
call fcn.0046eb7b
add esp, 8
test eax, eax
js 0x40e929
cmp eax, dword [edi - 8]
jg 0x40e929
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
test ebx, ebx
jne 0x40e8ae
mov esi, dword [ebp - 0x81c]
nop word [eax + eax]
cmp ebx, 0xea
je 0x40e8ae
lea eax, [ebp - 0x830]
mov dword [ebp - 0x830], 0
push eax
push 0x20019
push 0
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e863
push 0x800
push eax
lea eax, [ebp - 0x810]
push eax
call fcn.0046b3e0
mov ebx, dword [ebp - 0x82c]
lea eax, [ebp - 0x84c]
add esp, 0xc
mov dword [ebp - 0x850], 1
mov dword [ebp - 0x84c], 0x800
push eax
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x850]
push eax
push 0
push dword [ebx + 4]
push dword [ebp - 0x830]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
cmp dword [ebx + 8], 0
je 0x40e42b
push dword [ebx]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebp - 0x830]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov ebx, eax
mov dword [ebp - 0x824], ebx
call fcn.004080e0
test eax, eax
je 0x40e91f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x818], eax
push ebx
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 2
call fcn.00407d90
test al, al
jne 0x40e57e
test ebx, ebx
je 0x40e573
lea ecx, [ebx + 2]
nop dword [eax]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x40e490
sub ebx, ecx
sar ebx, 1
je 0x40e573
mov esi, dword [ebp - 0x818]
mov edx, dword [ebp - 0x824]
sub edx, esi
sar edx, 1
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x828], eax
mov dword [ebp - 0x848], edx
test ebx, ebx
js 0x40e929
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x40e4f5
push ebx
lea ecx, [ebp - 0x818]
call fcn.00408b10
mov esi, dword [ebp - 0x818]
mov edx, dword [ebp - 0x848]
lea ecx, [ebx + ebx]
mov eax, dword [esi - 8]
cmp edx, dword [ebp - 0x828]
ja 0x40e549
lea edx, [esi + edx*2]
test ecx, ecx
je 0x40e55f
test esi, esi
jne 0x40e520
call fcn.0046ea31
mov dword [eax], 0x16
call fcn.0046e928
jmp 0x40e55c
test edx, edx
je 0x40e50e
add eax, eax
cmp eax, ecx
jae 0x40e53c
call fcn.0046ea31
mov dword [eax], 0x22
call fcn.0046e928
jmp 0x40e55c
push ecx
push edx
push esi
call fcn.0046ae60
add esp, 0xc
jmp 0x40e55c
push ecx
push dword [ebp - 0x824]
add eax, eax
push eax
push esi
call fcn.0040c0f0
add esp, 0x10
lea ecx, [ebx + ebx]
cmp ebx, dword [esi - 8]
jg 0x40e929
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ecx], ax
jmp 0x40e584
lea ecx, [ebp - 0x818]
call fcn.0040e1a0
mov esi, dword [ebp - 0x818]
mov ebx, dword [str.70e489bf_a8ba_460f_9c42_567695d37140]
mov byte [ebp - 4], 3
mov dword [ebp - 0x824], ebx
call fcn.004080e0
test eax, eax
je 0x40e91f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x814], eax
push ebx
lea ecx, [ebp - 0x814]
mov byte [ebp - 4], 4
call fcn.00407d90
test al, al
jne 0x40e6dc
test ebx, ebx
je 0x40e6d1
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x40e5d4
sub ebx, ecx
sar ebx, 1
je 0x40e6d1
mov eax, dword [ebp - 0x814]
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0x848], ecx
mov ecx, dword [ebp - 0x824]
sub ecx, eax
sar ecx, 1
mov dword [ebp - 0x828], ecx
test ebx, ebx
js 0x40e929
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, ebx
or ecx, edx
jge 0x40e633
push ebx
lea ecx, [ebp - 0x814]
call fcn.00408b10
mov eax, dword [ebp - 0x814]
mov ecx, dword [ebp - 0x828]
lea edx, [ebx + ebx]
cmp ecx, dword [ebp - 0x848]
ja 0x40e698
lea ecx, [eax + ecx*2]
mov dword [ebp - 0x828], ecx
test edx, edx
je 0x40e6b7
test eax, eax
jne 0x40e667
call fcn.0046ea31
mov dword [eax], 0x16
call fcn.0046e928
jmp 0x40e6ae
test ecx, ecx
je 0x40e655
mov ecx, dword [eax - 8]
add ecx, ecx
cmp ecx, edx
jae 0x40e686
call fcn.0046ea31
mov dword [eax], 0x22
call fcn.0046e928
jmp 0x40e6ae
push edx
push dword [ebp - 0x828]
push eax
call fcn.0046ae60
add esp, 0xc
jmp 0x40e6ae
mov ecx, dword [eax - 8]
push edx
push dword [ebp - 0x824]
add ecx, ecx
push ecx
push eax
call fcn.0040c0f0
add esp, 0x10
mov eax, dword [ebp - 0x814]
lea edx, [ebx + ebx]
cmp ebx, dword [eax - 8]
jg 0x40e929
mov dword [eax - 0xc], ebx
xor ecx, ecx
mov eax, dword [ebp - 0x814]
mov word [edx + eax], cx
jmp 0x40e6dc
lea ecx, [ebp - 0x814]
call fcn.0040e1a0
mov ebx, dword [ebp - 0x82c]
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x83c]
mov byte [ebp - 4], 5
push ebx
push eax
call fcn.0043df90
add esp, 0xc
mov edx, dword [ebp - 0x814]
or eax, 0xffffffff
mov byte [ebp - 4], 7
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e71f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e74f
test esi, esi
je 0x40e91f
push esi
push dword [ebp - 0x83c]
call fcn.00479589
add esp, 8
test eax, eax
je 0x40e86d
inc dword [ebp - 0x838]
mov dword [ebp - 0x834], 0x104
cmp dword [edi - 0xc], 0
lea edx, [edi - 0x10]
mov ebx, dword [edx]
mov byte [ebp - 4], 8
je 0x40e7b7
mov eax, dword [edx + 0xc]
lea ecx, [edx + 0xc]
shr eax, 0x1f
test al, al
je 0x40e793
cmp dword [edx + 8], 0
jl 0x40e929
xor eax, eax
mov dword [edx + 4], 0
mov word [edi], ax
jmp 0x40e7b7
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40e7a7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x820], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
mov byte [ebp - 4], 7
jge 0x40e7e5
push 0x104
lea ecx, [ebp - 0x820]
call fcn.00408b10
mov edi, dword [ebp - 0x820]
cmp dword [edi - 8], 0x104
jl 0x40e929
xor eax, eax
mov dword [edi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [edi + 0x208], ax
lea eax, [ebp - 0x834]
push eax
mov eax, dword [ebp - 0x838]
push edi
push eax
push dword [ebp - 0x81c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edx, dword [ebp - 0x83c]
mov ebx, eax
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e841
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e85d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x81c]
test ebx, ebx
je 0x40e380
jmp 0x40e8ae
mov ecx, dword [ebp - 0x840]
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x83c]
add edx, 0xfffffff0
or dword [ecx], eax
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e896
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e8ae
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40e8cd
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x840]
mov ecx, dword [ebp - 0x844]
mov ebx, dword [ebp - 0x81c]
mov eax, dword [ebp - 0x82c]
add ecx, 0x10
add eax, 0x10
mov dword [ebp - 0x844], ecx
mov dword [ebp - 0x82c], eax
cmp ecx, 0xb0
jb 0x40e2a0
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.0043d1d8
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00407b40
push 0x80070057
call fcn.00407b40
int3