Function at 0x30117bdd
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x52c
mov eax, dword [0x301d9c6c]
push ebx
xor ebx, ebx
cmp eax, ebx
je 0x30117bff
call eax
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x30117e9a
push esi
push edi
push dword [0x301912a0]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x30117d7b
mov edi, 0x104
push edi
lea eax, [ebp - 0x52c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x30117c35
mov byte [ebp - 0x52c], bl
push edi
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x30117c4d
mov byte [ebp - 0x424], bl
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 8]
call esi
test eax, eax
jne 0x30117c6a
mov byte [ebp - 0x21c], bl
push edi
lea eax, [ebp - 0x114]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call esi
test eax, eax
jne 0x30117c86
mov byte [ebp - 0x114], bl
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.30117b42
lea eax, [ebp - 4]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x30117ca3
sub eax, edx
mov ecx, eax
lea eax, [ebp - 0x31c]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x30117cb7
sub eax, esi
add eax, ecx
mov byte [ebp + eax - 0x113], bl
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.30117b42
lea eax, [ebp - 4]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x30117ce6
sub eax, ecx
lea ecx, [ebp - 0x31c]
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x30117cf8
sub ecx, esi
add ecx, eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x424]
push eax
mov byte [ebp + ecx - 0x21b], bl
call fcn.30117a7c
test eax, eax
jne 0x30117d38
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.30117a7c
test eax, eax
jne 0x30117d66
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x52c]
push eax
call fcn.30117a7c
test eax, eax
jne 0x30117d72
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x52c]
push eax
call fcn.30117a7c
test eax, eax
je 0x30117d72
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 8], ebx
cmp dword [ebp - 8], ebx
jne 0x30117e98
push 0x30020400
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push esi
push 0x301912c4
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
je 0x30117da2
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x301912c4]
cmp eax, ebx
je 0x30117e98
push 0x300322cc
push eax
call fcn.30117ade
push 0x300322b8
push dword [0x301912c4]
mov esi, eax
call fcn.30117ade
cmp esi, ebx
mov edi, eax
je 0x30117e98
cmp edi, ebx
je 0x30117e98
lea eax, [ebp - 4]
push eax
push 1
push ebx
push 0x30032264
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x30117e98
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x114]
push eax
push ebx
push ebx
push 0x30032290
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x104
mov byte [ebp - 0x114], bl
call edi
test eax, eax
jne 0x30117e8f
mov eax, 0x300322a0
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x30117e28
lea edi, [ebp - 0x114]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x30117e38
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x301912a0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x30117e57
lea edi, [ebp - 0x114]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x30117e69
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x114]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, dword [ebp - 8]
pop ebx
leave
ret