Function at 0x401540
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x2540
call fcn.00402010
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x253c], eax
push str.CreateSvcRpc___www.x86matthew.com_n
call fcn.0040772b
add esp, 4
lea edi, [esp + 8]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x104
call fcn.00407720
add esp, 4
test eax, eax
je 0x4017bc
mov esi, eax
push edi
push str._s1.exe
push 0x104
push eax
call fcn.00401330
add esp, 0x10
xorps xmm0, xmm0
movups xmmword [esp + 0x20c], xmm0
movups xmmword [esp + 0x21c], xmm0
movups xmmword [esp + 0x22c], xmm0
movups xmmword [esp + 0x23c], xmm0
movups xmmword [esp + 0x24c], xmm0
movups xmmword [esp + 0x25c], xmm0
movups xmmword [esp + 0x26c], xmm0
movups xmmword [esp + 0x27c], xmm0
movups xmmword [esp + 0x28c], xmm0
movups xmmword [esp + 0x29c], xmm0
movups xmmword [esp + 0x2ac], xmm0
movups xmmword [esp + 0x2bc], xmm0
movups xmmword [esp + 0x2cc], xmm0
movups xmmword [esp + 0x2dc], xmm0
movups xmmword [esp + 0x2ec], xmm0
movups xmmword [esp + 0x2fc], xmm0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea edi, [esp + 0x20c]
push eax
push str.CreateSvcRpc__u
push 0xff
push edi
call fcn.00401330
add esp, 0x10
push edi
call fcn.00407940
add esp, 4
mov dword [esp + 4], eax
xorps xmm0, xmm0
movups xmmword [esp + 0x10c], xmm0
movups xmmword [esp + 0x11c], xmm0
movups xmmword [esp + 0x12c], xmm0
movups xmmword [esp + 0x13c], xmm0
movups xmmword [esp + 0x14c], xmm0
movups xmmword [esp + 0x15c], xmm0
movups xmmword [esp + 0x16c], xmm0
movups xmmword [esp + 0x17c], xmm0
movups xmmword [esp + 0x18c], xmm0
movups xmmword [esp + 0x19c], xmm0
movups xmmword [esp + 0x1ac], xmm0
movups xmmword [esp + 0x1bc], xmm0
movups xmmword [esp + 0x1cc], xmm0
movups xmmword [esp + 0x1dc], xmm0
movups xmmword [esp + 0x1ec], xmm0
movups xmmword [esp + 0x1fc], xmm0
lea ebx, [esp + 0x10c]
push esi
push str.cmd__c_start__s
push 0xff
push ebx
call fcn.00401330
add esp, 0x10
push ebx
call fcn.00407940
add esp, 4
mov ebx, eax
push str.Connecting_to_SVCCTL_RPC_pipe...
call fcn.0040772b
add esp, 4
lea ebp, [esp + 0x233c]
push 0x200
push 0
push ebp
call fcn.00403610
add esp, 0xc
push str.ntsvcs
push str..pipe_s
push 0x1ff
push ebp
call fcn.00401330
sub esp, 0xc
movaps xmm0, xmmword [0x4170d0]
movups xmmword [esp + 4], xmm0
mov dword [esp], ebp
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x4017aa
mov ebp, eax
lea eax, [esp + 0x132c]
push 0x1010
push 0
push eax
call fcn.00403610
add esp, 0xc
mov dword [esp + 0x1324], ebp
mov dword [esp + 0x1328], 1
lea ebp, [esp + 0x1324]
push 2
push str.367abb81_9844_35f1_ad32_98f038001003
push ebp
call section..text
add esp, 0xc
test eax, eax
je 0x4017dd
push str.Failed_to_connect_to_RPC_pipe
call fcn.0040772b
add esp, 4
jmp 0x401f47
push 2
call fcn.004038a7
add esp, 4
push eax
push 1
push 0x27
push str.Failed_to_allocate_memory_for_pExecCmd_n
call fcn.0040742f
add esp, 0x10
jmp 0x401f47
mov dword [esp], ebx
lea ebx, [esp + 0x30c]
push 0x1018
push ebp
push ebx
call fcn.00403090
add esp, 0xc
push str.Opening_service_manager...
call fcn.0040772b
add esp, 4
lea eax, [esp + 0x328]
push 0xffc
push 0
push eax
call fcn.00403610
add esp, 0xc
movaps xmm0, xmmword [0x4170e0]
movups xmmword [esp + 0x314], xmm0
mov dword [esp + 0x324], 0xf003f
mov dword [esp + 0xb1c], 0xc
push 0x1b
push ebx
call fcn.004013a0
add esp, 8
test eax, eax
jne 0x401f3a
cmp dword [esp + 0x1320], 0x18
jne 0x401f3a
mov eax, dword [esp + 0xb34]
test eax, eax
je 0x40187e
push eax
push str.OpenSCManager_error:__u_n
call fcn.00401f90
add esp, 8
jmp 0x401f3a
mov eax, dword [esp + 4]
lea ebp, [eax + 1]
lea ebx, [esp + 0x31c]
mov eax, dword [ebx + 0x814]
mov dword [esp + 0x1334], eax
movups xmm0, xmmword [ebx + 0x804]
movups xmmword [esp + 0x1324], xmm0
push str.Creating_temporary_service...
call fcn.0040772b
add esp, 4
mov dword [esp + 0x314], 0
mov dword [esp + 0x318], 1
lea eax, [esp + 0x338]
push 0xfec
push 0
push eax
call fcn.00403610
add esp, 0xc
movups xmm0, xmmword [esp + 0x1324]
movups xmmword [ebx], xmm0
mov eax, dword [esp + 0x1334]
mov dword [ebx + 0x10], eax
mov dword [esp + 0x330], ebp
mov dword [esp + 0x334], 0
mov dword [esp + 0xb1c], 0x1c
cmp dword [esp + 0x318], 0
je 0x401dad
mov dword [esp + 0x338], ebp
mov ecx, dword [esp + 0xb1c]
lea eax, [ecx + 4]
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
mov edx, 0x7fc
sub edx, ecx
cmp edx, ebp
jae 0x401960
mov dword [esp + 0x314], 1
jmp 0x40199a
add eax, esp
add eax, 0x31c
push ebp
push edi
push eax
call fcn.00403090
add esp, 0xc
mov eax, dword [esp + 0xb1c]
mov ecx, dword [esp + 4]
and ecx, 0xfffffffc
add eax, ecx
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x4019b2
mov dword [esp + 0x314], 1
jmp 0x4019dc
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x4019f4
mov dword [esp + 0x314], 1
jmp 0x401a1e
mov dword [esp + eax + 0x31c], 0xf01ff
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401a36
mov dword [esp + 0x314], 1
jmp 0x401a60
mov dword [esp + eax + 0x31c], 0x10
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401a78
mov dword [esp + 0x314], 1
jmp 0x401aa2
mov dword [esp + eax + 0x31c], 3
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401aba
mov dword [esp + 0x314], 1
jmp 0x401ae4
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
mov ecx, dword [esp]
inc ecx
lea edx, [eax - 0x7fd]
cmp edx, 3
ja 0x401b00
mov dword [esp + 0x314], 1
jmp 0x401b26
mov dword [esp + eax + 0x31c], ecx
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea edx, [eax - 0x7fd]
cmp edx, 3
ja 0x401b3e
mov dword [esp + 0x314], 1
jmp 0x401b68
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea edx, [eax - 0x7fd]
cmp edx, 3
ja 0x401b80
mov dword [esp + 0x314], 1
jmp 0x401ba6
mov dword [esp + eax + 0x31c], ecx
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
mov edx, 0x800
sub edx, eax
cmp edx, ecx
jae 0x401bbe
mov dword [esp + 0x314], 1
jmp 0x401bfe
add eax, esp
add eax, 0x31c
push ecx
lea ecx, [esp + 0x110]
push ecx
push eax
call fcn.00403090
add esp, 0xc
mov eax, dword [esp + 0xb1c]
mov ecx, dword [esp]
and ecx, 0xfffffffc
add eax, ecx
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401c16
mov dword [esp + 0x314], 1
jmp 0x401c40
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401c58
mov dword [esp + 0x314], 1
jmp 0x401c82
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401c9a
mov dword [esp + 0x314], 1
jmp 0x401cc4
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401cdc
mov dword [esp + 0x314], 1
jmp 0x401d06
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401d1e
mov dword [esp + 0x314], 1
jmp 0x401d44
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401d5c
mov dword [esp + 0x314], 1
jmp 0x401d82
mov dword [esp + eax + 0x31c], 0
mov eax, dword [esp + 0xb1c]
add eax, 4
mov dword [esp + 0xb1c], eax
cmp dword [esp + 0x318], 0
je 0x401dad
lea ecx, [eax - 0x7fd]
cmp ecx, 3
ja 0x401d9a
mov dword [esp + 0x314], 1
jmp 0x401dad
mov dword [esp + eax + 0x31c], 0
add dword [esp + 0xb1c], 4
push 0x18
lea edi, [esp + 0x310]
push edi
call fcn.004013a0
add esp, 8
test eax, eax
jne 0x401f3a
cmp dword [esp + 0x1320], 0x1c
jne 0x401f3a
mov eax, dword [esp + 0xb38]
test eax, eax
je 0x401deb
push eax
push str.CreateService_error:__u_n
jmp 0x401871
mov eax, dword [esp + 0xb34]
mov dword [esp + 0x234c], eax
movups xmm0, xmmword [esp + 0xb24]
movups xmmword [esp + 0x233c], xmm0
push esi
push str.Executing__s_as_SYSTEM_user..._n
call fcn.00401f90
add esp, 8
mov dword [esp + 0x314], 0
mov dword [esp + 0x318], 1
push 0xfec
push 0
lea eax, [esp + 0x340]
push eax
call fcn.00403610
add esp, 0xc
movups xmm0, xmmword [esp + 0x233c]
movups xmmword [ebx], xmm0
mov eax, dword [esp + 0x234c]
mov dword [ebx + 0x10], eax
mov dword [esp + 0x330], 0
mov dword [esp + 0x334], 0
mov dword [esp + 0xb1c], 0x1c
push 0x1f
push edi
call fcn.004013a0
add esp, 8
test eax, eax
jne 0x401f3a
cmp dword [esp + 0x1320], 4
jne 0x401f3a
mov eax, dword [esp + 0xb20]
test eax, eax
je 0x401eb1
cmp eax, 0x41d
jne 0x401f67
push str.Deleting_temporary_service...
call fcn.0040772b
add esp, 4
mov dword [esp + 0x314], 0
mov dword [esp + 0x318], 1
lea eax, [esp + 0x330]
push 0xff4
push 0
push eax
call fcn.00403610
add esp, 0xc
movups xmm0, xmmword [esp + 0x233c]
movups xmmword [ebx], xmm0
mov eax, dword [esp + 0x234c]
mov dword [ebx + 0x10], eax
mov dword [esp + 0xb1c], 0x14
push 2
push edi
call fcn.004013a0
add esp, 8
test eax, eax
jne 0x401f3a
cmp dword [esp + 0x1320], 4
jne 0x401f3a
mov eax, dword [esp + 0xb20]
test eax, eax
je 0x401f72
push eax
push str.DeleteService_error:__u_n
jmp 0x401871
push dword [esp + 0x30c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 1
mov ecx, dword [esp + 0x253c]
xor ecx, esp
call fcn.00401ff6
mov eax, esi
add esp, 0x2540
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
push str.StartService_error:__u_n
jmp 0x401871
push str.Finished
call fcn.0040772b
add esp, 4
push dword [esp + 0x30c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
jmp 0x401f4c