Function at 0x1007616
Capabilities:
Get common file path
Link many functions at runtime
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 4], 0
push ebx
push esi
push edi
push 0x1016be8
mov dword [0x1016be8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x100764a
push 1
push 0x100137c
jmp 0x10078d1
mov esi, 0x104
push esi
mov edi, 0x10166cc
push edi
call fcn.0100c2ca
mov ebx, eax
test ebx, ebx
jne 0x100766d
push 1
push 0x1001354
jmp 0x10078d1
lea eax, [ebx + 0x10166cc]
push eax
push edi
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x5c
je 0x100768f
mov byte [ebx + 0x10166cc], 0x5c
inc ebx
mov byte [ebx + 0x10166cc], 0
push esi
push edi
push 0x10169d8
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, esi
sub eax, ebx
push eax
push 0x10058d8
lea eax, [ebx + 0x10169d8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push esi
mov ebx, 0x10168d4
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x10078ca
push ebx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
test eax, eax
je 0x10078ca
push esi
mov ebx, 0x10165c8
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
mov dword [ebp - 8], eax
jne 0x10076f9
push 1
push 0x100132c
jmp 0x10078d1
lea eax, [eax + 0x10165c8]
push eax
push ebx
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x5c
je 0x1007722
mov eax, dword [ebp - 8]
lea eax, [eax + 0x10165c8]
mov byte [eax], 0x5c
mov eax, dword [ebp - 8]
mov byte [eax + 0x10165c9], 0
push 0x100666c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [0x1016c90], eax
jne 0x1007743
push eax
push 0x10
push 0x401
jmp 0x10078df
cmp dword [0x1016bf8], 1
jne 0x1007766
push esi
push edi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
call edi
push esi
push ebx
push ebx
call edi
push esi
mov eax, 0x10169d8
push eax
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x100131c
push dword [0x1016c90]
call edi
push 0x1001308
push dword [0x1016c90]
mov dword [0x1016c94], eax
call edi
push 0x10012f8
push dword [0x1016c90]
mov dword [0x1016c98], eax
call edi
xor ebx, ebx
cmp dword [0x1016c94], ebx
mov dword [0x1016c9c], eax
je 0x10078ae
cmp dword [0x1016c98], ebx
je 0x10078ae
cmp eax, ebx
je 0x10078ae
push 0x10012e4
push dword [0x1016c90]
call edi
push 0x10012d4
push dword [0x1016c90]
mov dword [0x1016ca0], eax
call edi
push dword [ebp + 8]
mov dword [0x1016ca4], eax
call fcn.0100742e
mov eax, dword [0x1016c8c]
dec eax
je 0x100781a
dec eax
jne 0x10078ed
mov dword [0x1016be4], 0x10056e0
mov eax, 0x403
mov dword [0x1016be0], 0x1004f7c
jmp 0x1007833
mov dword [0x1016be4], 0x10056d4
mov eax, 0x3e8
mov dword [0x1016be0], 0x1005210
push esi
push 0x10167d0
push eax
push dword [0x1016cac]
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x1007853
push 1
push 0x10012a8
jmp 0x10078d1
cmp dword [0x1016c80], 1
jne 0x10078ed
lea eax, [ebp - 0xc]
push eax
push 1
push ebx
push dword [0x1016be0]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10078ed
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], esi
mov esi, 0x1016cb8
push esi
push ebx
push ebx
push 0x10055f4
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x10078a3
mov dword [0x1016be4], esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x10078ed
push ebx
push 0x10
push 0x402
push ebx
call fcn.0100cc57
push dword [0x1016c90]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10078e6
push 1
push 0x1001280
call fcn.0100cbb8
push 0
push 0x10
push 0x400
push 0
call fcn.0100cc57
mov dword [ebp - 4], 0x80004005
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4