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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10083179
mov eax, dword fs:[0]
push eax
sub esp, 0x834
mov eax, dword [0x100a1040]
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 dword [ebp - 0x828], edx
mov eax, ecx
mov dword [ebp - 0x820], eax
mov dword [ebp - 0x834], eax
mov dword [ebp - 0x834], eax
call fcn.10004070
mov ecx, eax
test ecx, ecx
je 0x10031688
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x818], esi
mov dword [ebp - 4], 0
mov edi, dword [0x100a4098]
test edi, edi
je 0x10031100
lock inc dword [edi + 4]
mov edi, dword [0x100a4098]
mov ecx, dword [0x100a4094]
mov dword [ebp - 0x838], ecx
mov dword [ebp - 0x834], edi
mov byte [ebp - 4], 1
lea edx, [ebp - 0x81c]
mov eax, dword [ecx]
push edx
call dword [eax + 0x40]
or ebx, 0xffffffff
mov byte [ebp - 4], 3
test edi, edi
je 0x1003114c
mov eax, ebx
lock xadd dword [edi + 4], eax
jne 0x1003114c
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, ebx
lock xadd dword [edi + 8], eax
jne 0x1003114c
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov dword [ebp - 0x82c], 0
call fcn.10004070
mov ecx, eax
test ecx, ecx
je 0x10031692
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x824], eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
lea ecx, [ebp - 0x824]
mov byte [ebp - 4], 4
call fcn.10007ac0
test al, al
jne 0x1003119d
push 0x34
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
lea ecx, [ebp - 0x824]
call fcn.10007d40
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x824]
mov eax, dword [ebp - 0x81c]
push dword [eax - 0xc]
push eax
call fcn.100113c0
mov edi, dword [ebp - 0x824]
lea eax, [ebp - 0x82c]
push eax
push 0x20019
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1003126c
mov dword [ebp - 0x830], eax
mov ecx, 1
mov dword [ebp - 0x814], 0x104
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x10031218
push 0x400
lea ecx, [ebp - 0x818]
call fcn.10007ce0
mov esi, dword [ebp - 0x818]
lea eax, [ebp - 0x814]
push eax
push esi
lea eax, [ebp - 0x830]
push eax
push 0
push str.Path
push dword [ebp - 0x82c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esi - 8]
push esi
call fcn.10061d3b
add esp, 8
test eax, eax
js 0x1003169c
cmp eax, dword [esi - 8]
jg 0x1003169c
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [ebp - 0x82c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031358
cmp dword [ebp - 0x828], 0
je 0x100312e5
call fcn.10004070
test eax, eax
je 0x100316b0
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x814], eax
mov esi, dword [ebp - 0x828]
lea ecx, [ebp - 0x814]
push esi
mov byte [ebp - 4], 6
call fcn.10007ac0
test al, al
jne 0x100312dc
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100312c0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x814]
call fcn.10007d40
mov byte [ebp - 4], 7
jmp 0x10031560
add esi, 0xfffffff0
mov ecx, esi
call fcn.10007880
mov ecx, dword [ebp - 0x820]
add eax, 0x10
mov byte [ebp - 4], 3
add edi, 0xfffffff0
mov dword [ecx], eax
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x10031315
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x81c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10031336
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10031666
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10031666
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.10055b90
add esp, 0xc
lea eax, [ebp - 0x810]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x810]
push 0x10094f5c
push eax
call ebx
push dword [ebp - 0x81c]
lea eax, [ebp - 0x810]
push eax
call ebx
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100314f3
call fcn.10004070
mov ecx, eax
test ecx, ecx
je 0x100316a6
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x814], eax
lea eax, [ebp - 0x810]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x814]
call fcn.10007ac0
test al, al
jne 0x10031423
lea ecx, [ebp - 0x810]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031401
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x814]
call fcn.10007d40
lea edx, [ebp - 0x814]
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x834]
call fcn.10033850
mov byte [ebp - 4], 0xa
lea ecx, [esi - 0x10]
mov edx, dword [eax]
mov dword [ebp - 0x830], ecx
lea ebx, [edx - 0x10]
cmp ebx, ecx
je 0x100314ac
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x10031497
mov eax, dword [ebx]
cmp eax, dword [ecx]
jne 0x10031497
mov ecx, ebx
call fcn.10007880
or ebx, 0xffffffff
mov dword [ebp - 0x83c], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x1003148c
mov esi, dword [ebp - 0x830]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x83c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x818], esi
jmp 0x100314af
push dword [edx - 0xc]
lea ecx, [ebp - 0x818]
push edx
call fcn.10007d40
mov esi, dword [ebp - 0x818]
or ebx, 0xffffffff
mov byte [ebp - 4], 9
mov eax, ebx
mov edx, dword [ebp - 0x834]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100314d0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x814]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100314f6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x100314f6
or ebx, 0xffffffff
cmp dword [ebp - 0x828], 0
je 0x100315fc
call fcn.10004070
mov ecx, eax
test ecx, ecx
je 0x100316b0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x814], eax
mov esi, dword [ebp - 0x828]
lea ecx, [ebp - 0x814]
push esi
mov byte [ebp - 4], 0xb
call fcn.10007ac0
test al, al
jne 0x1003155c
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031540
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x814]
call fcn.10007d40
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x820]
lea eax, [ebp - 0x814]
push eax
lea edx, [ebp - 0x818]
call fcn.10033930
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x814]
add esp, 4
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003159c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov byte [ebp - 4], 3
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x100315b7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x81c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100315d8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10031666
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10031666
add esi, 0xfffffff0
mov ecx, esi
call fcn.10007880
mov ecx, dword [ebp - 0x820]
add eax, 0x10
mov byte [ebp - 4], 3
add edi, 0xfffffff0
mov dword [ecx], eax
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1003162c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x81c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003164d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10031666
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x820]
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.100535a4
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10001410
push 0x80004005
call fcn.10001410
push 0x80070057
call fcn.10001410
push 0x80004005
call fcn.10001410
push 0x80004005
call fcn.10001410
int3