Function at 0x1004c3a0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 0x664], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x660], edi
mov dword [ebp - 0x654], eax
cmp dword [edi + 0x4c], 0
jne 0x1004c3e7
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 8
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x65c], 0
cmp byte [edi + 0xd0], 0
mov dword [ebp - 0x658], esi
je 0x1004c42f
push 8
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x1004c41b
mov ecx, eax
call fcn.10120260
jmp 0x1004c41d
xor eax, eax
push eax
lea ecx, [ebp - 0x65c]
call fcn.10032660
mov esi, dword [ebp - 0x658]
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 0x1004c462
xor bl, bl
jmp 0x1004c6d1
movzx ebx, byte [edi + 0xd1]
lea eax, [ebp - 0x414]
neg ebx
push 0x208
sbb ebx, ebx
push 0
and ebx, 0xffffff00
push eax
add ebx, 0xf023f
call sub.msvcrt.dll_memset
add edi, 0x3c
add esp, 0xc
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x1004c49c
mov eax, dword [edi]
push eax
push str.SYSTEMCurrentControlSetServices
push 0x102040c0
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.1000aa70
push dword [ebp - 0x654]
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0x660]
push reloc.OLEAUT32.dll_SysReAllocString
movzx eax, byte [eax + 0xd1]
push eax
call fcn.1003b1b0
add esp, 0x24
mov byte [ebp - 0x64d], al
test al, al
je 0x1004c6cb
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x658], 1
cmp dword [edi + 0x14], 8
mov eax, edi
mov dword [ebp - 0x654], 0x208
jb 0x1004c522
mov eax, dword [edi]
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 - 0x654]
push ebx
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x658]
push eax
push str.ServiceDll
lea eax, [ebp - 0x414]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.100585c0
test eax, eax
jne 0x1004c59b
cmp word [ebp - 0x20c], ax
je 0x1004c59b
mov eax, dword [ebp - 0x658]
cmp eax, 1
je 0x1004c630
cmp eax, 2
je 0x1004c630
cmp eax, 7
je 0x1004c630
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x658], 1
mov dword [ebp - 0x654], 0x208
jb 0x1004c5b7
mov edi, dword [edi]
push edi
push str.SYSTEMCurrentControlSetServices
push 0x102040c0
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.1000aa70
add esp, 0x14
lea eax, [ebp - 0x654]
push ebx
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x658]
push eax
push str.ImagePath
lea eax, [ebp - 0x414]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.100585c0
test eax, eax
jne 0x1004c6cb
cmp word [ebp - 0x20c], ax
je 0x1004c6cb
mov eax, dword [ebp - 0x658]
cmp eax, 1
je 0x1004c630
cmp eax, 2
je 0x1004c630
cmp eax, 7
jne 0x1004c6cb
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, 0x18
test eax, eax
je 0x1004c6cb
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x634]
call fcn.10020470
lea eax, [ebp - 0x634]
push eax
mov eax, dword [ebp - 0x660]
movzx eax, byte [eax + 0xd0]
push eax
lea eax, [ebp - 0x64c]
push eax
call fcn.10040a60
mov ecx, dword [ebp - 0x664]
add esp, 0xc
push eax
call fcn.10051f40
lea ecx, [ebp - 0x64c]
call fcn.10005250
lea ecx, [ebp - 0x634]
call fcn.10005250
mov bl, byte [ebp - 0x64d]
test esi, esi
je 0x1004c6f6
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x1004c6f6
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x1004c6f6
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov ecx, dword [ebp - 4]
mov al, bl
pop esi
pop ebx
xor ecx, ebp
pop edi
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 8