Function at 0x100490a0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x630
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0x620], eax
cmp dword [ebx + 0x4c], 0
jne 0x100490d8
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 4
push esi
push edi
xor edi, edi
mov dword [ebp - 0x630], 0
cmp byte [ebx + 0xd0], 0
mov dword [ebp - 0x62c], edi
je 0x10049120
push 8
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x1004910c
mov ecx, eax
call fcn.10120260
jmp 0x1004910e
xor eax, eax
push eax
lea ecx, [ebp - 0x630]
call fcn.10032660
mov edi, dword [ebp - 0x62c]
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x61c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x10049153
xor bl, bl
jmp 0x100493f2
movzx eax, byte [ebx + 0xd1]
neg eax
push 0x208
sbb eax, eax
and eax, 0xffffff00
add eax, 0xf023f
mov dword [ebp - 0x62c], eax
lea eax, [ebp - 0x414]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.msvcrt.dll_memset
lea esi, [ebx + 0x3c]
mov dword [ebp - 0x624], 1
add esp, 0x18
mov dword [ebp - 0x628], 0x208
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x100491b8
mov eax, dword [esi]
push eax
push str.SYSTEMCurrentControlSetServices
push str._s_sParameters
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.1000aa70
add esp, 0x14
lea eax, [ebp - 0x628]
push dword [ebp - 0x62c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x624]
push eax
push str.ServiceDll
lea eax, [ebp - 0x414]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.100585c0
test eax, eax
jne 0x10049236
cmp word [ebp - 0x20c], ax
je 0x10049236
mov eax, dword [ebp - 0x624]
cmp eax, 1
je 0x100492d2
cmp eax, 2
je 0x100492d2
cmp eax, 7
je 0x100492d2
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [ebp - 0x624], 1
mov dword [ebp - 0x628], 0x208
jb 0x10049254
mov eax, dword [esi]
push eax
push str.SYSTEMCurrentControlSetServices
push 0x102040c0
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.1000aa70
add esp, 0x14
lea eax, [ebp - 0x628]
push dword [ebp - 0x62c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x624]
push eax
push str.ImagePath
lea eax, [ebp - 0x414]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.100585c0
test eax, eax
jne 0x1004936a
cmp word [ebp - 0x20c], ax
je 0x1004936a
mov eax, dword [ebp - 0x624]
cmp eax, 1
je 0x100492d2
cmp eax, 2
je 0x100492d2
cmp eax, 7
jne 0x1004936a
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x100492dc
mov eax, dword [esi]
push eax
push dword [ebp - 0x620]
call fcn.100451e0
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.10155560
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x61c]
push eax
call fcn.10155c00
lea eax, [ebp - 0x20c]
push eax
call fcn.10045280
lea eax, [ebp - 0x20c]
push eax
call fcn.1000aa00
add esp, 0x20
test eax, eax
je 0x1004935b
movzx eax, byte [ebx + 0xa]
push eax
push dword [ebx]
movzx eax, byte [ebx + 0xd4]
push eax
movzx eax, byte [ebx + 0xd0]
push eax
push 1
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x620]
call fcn.1003e330
add esp, 0x1c
jmp 0x1004936a
lea eax, [ebp - 0x20c]
push eax
call fcn.100d9640
add esp, 4
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10049374
mov eax, dword [esi]
push eax
push str.SYSTEMCurrentControlSetServices
push str._s_sParameters
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.1000aa70
mov ebx, dword [ebp - 0x62c]
lea eax, [ebp - 0x414]
push ebx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
push dword [ebp - 0x620]
call fcn.1003e420
add esp, 0x24
cmp dword [esi + 0x14], 8
jb 0x100493b9
mov esi, dword [esi]
push esi
push str.SYSTEMCurrentControlSetServices
push 0x102040c0
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.1000aa70
push ebx
lea eax, [ebp - 0x414]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
push dword [ebp - 0x620]
call fcn.1003e420
add esp, 0x24
mov bl, 1
test edi, edi
je 0x10049417
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x10049417
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x10049417
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 4