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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x495925
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x4c206c]
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 edi, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [ebp - 0x238], edi
mov dword [ebp - 0x224], 0
call fcn.0041d700
mov ecx, eax
test ecx, ecx
je 0x422108
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 0x224], 1
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
sub esp, 0x14
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x234]
push str.SoftwareMicrosoftWindowsCurrentVersionApp_PathsAliWorkbench.exe
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00423c10
or ebx, 0xffffffff
test eax, eax
jne 0x421f46
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00471be0
add esp, 0xc
mov dword [ebp - 0x21c], 0x208
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x220]
push eax
push 0
push str.Path
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x421f46
mov eax, dword [ebp - 0x220]
cmp eax, 1
je 0x421e26
cmp eax, 2
jne 0x421f46
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x421e4a
test al, 1
jne 0x421f46
shr eax, 1
cmp word [ebp + eax*2 - 0x21a], 0
je 0x421e53
jmp 0x421f46
xor eax, eax
mov word [ebp - 0x218], ax
call fcn.0041d700
mov ecx, eax
test ecx, ecx
je 0x422112
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x21c]
call fcn.0041d970
test al, al
jne 0x421eb5
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x421e93
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.0041dc20
push ecx
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 3
call fcn.00404e40
mov esi, dword [ebp - 0x21c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x421f2b
mov ebx, dword [edi]
lea ecx, [esi - 0x10]
sub ebx, 0x10
cmp ecx, ebx
je 0x421f28
cmp dword [ebx + 0xc], 0
jl 0x421f1d
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x421f1d
call fcn.0041d470
mov dword [ebp - 0x220], eax
lea edx, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x421f16
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x220]
add eax, 0x10
mov dword [edi], eax
jmp 0x421f28
push dword [esi - 0xc]
mov ecx, edi
push esi
call fcn.0041dc20
or ebx, 0xffffffff
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x421f46
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x4220d7
mov edx, 0x26
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x21c]
call fcn.004019a0
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x224], 3
mov esi, eax
call fcn.00401890
mov edx, dword [esi]
mov esi, dword [edi]
sub esi, 0x10
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x421fd0
cmp dword [esi + 0xc], 0
jl 0x421fc5
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x421fc5
call fcn.0041d470
mov dword [ebp - 0x220], eax
lea edx, [esi + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x421fbe
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x220]
add eax, 0x10
mov dword [edi], eax
jmp 0x421fd0
push dword [edx - 0xc]
mov ecx, edi
push edx
call fcn.0041dc20
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x224], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x421ff9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, str.app_dir_name
call fcn.004028f0
mov esi, eax
test esi, esi
jne 0x42200d
xor ecx, ecx
jmp 0x422021
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x422012
sub ecx, edx
sar ecx, 1
mov eax, dword [edi]
mov edx, esi
sub edx, eax
sar edx, 1
mov dword [ebp - 0x220], edx
mov ebx, dword [eax - 0xc]
mov dword [ebp - 0x228], ebx
test ecx, ecx
js 0x42211c
test esi, esi
jne 0x42204e
xor edx, edx
mov dword [ebp - 0x21c], edx
jmp 0x422060
push ecx
push esi
call fcn.00479dc7
add esp, 8
mov dword [ebp - 0x21c], eax
mov edx, eax
mov ecx, SysReAllocString
sub ecx, edx
cmp ecx, ebx
jl 0x422126
add ebx, edx
js 0x422130
mov eax, dword [edi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, ebx
or ecx, eax
jge 0x422098
push ebx
mov ecx, edi
call fcn.0041db00
mov edx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp - 0x228]
cmp eax, ecx
ja 0x4220ad
mov esi, dword [edi]
lea esi, [esi + eax*2]
mov eax, dword [edi]
add edx, edx
push edx
push esi
lea ecx, [eax + ecx*2]
call fcn.0041db60
mov eax, dword [edi]
add esp, 8
cmp ebx, dword [eax - 8]
jg 0x42211c
mov dword [eax - 0xc], ebx
xor ecx, ecx
mov eax, dword [edi]
mov word [eax + ebx*2], cx
mov ecx, edi
call fcn.00401890
mov eax, dword [ebp - 0x234]
test eax, eax
je 0x4220e8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
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.004591b7
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.0041dc00
push 0x80004005
call fcn.0041dc00
push 0x80070057
call fcn.0041dc00
push 0x80070057
call fcn.0041dc00
push 0x80070057
call fcn.0041dc00
int3