Function at 0x4e22c0
Capabilities:
Get common file path
Set current directory

Disassembly:
sub esp, 0x81c
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x818], eax
mov eax, dword [esp + 0x824]
push esi
push edi
mov esi, ecx
cmp esi, 7
mov edi, edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
jl 0x4e2307
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x818]
xor ecx, esp
call fcn.0051a8be
add esp, 0x81c
ret
push ebx
push ebp
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [esp + 0x24]
movzx eax, word [esp + 0x22]
movzx ecx, word [esp + 0x20]
push edx
movzx edx, word [esp + 0x22]
push eax
movzx eax, word [esp + 0x22]
push ecx
movzx ecx, word [esp + 0x24]
push edx
push eax
push ecx
lea edx, [esp + 0x40]
push str._.4d_.2d_.2d__.2d_.2d_.2d
push edx
call fcn.0051a8cd
shl esi, 8
mov ebp, esi
lea ebx, [ebp + str.ps_session]
push ebx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x350]
push str.Log_s__s.dmp
push ecx
call fcn.0051a8cd
push ebx
lea edx, [esp + 0x15c]
push str._s.pdb
push edx
call fcn.0051a8cd
push ebx
lea eax, [esp + 0x268]
push str._s.exe
push eax
call fcn.0051a8cd
mov edx, dword [esp + 0x58]
add esp, 0x48
push 0
lea ecx, [esp + 0x32c]
push ecx
push edx
mov ecx, 0x109c6a4
call fcn.004eebb0
lea eax, [esp + 0x128]
push eax
lea ecx, [esp + 0x22c]
push ecx
mov ecx, 0x109c6a4
call fcn.004edd10
mov esi, dword [edi]
mov eax, esi
lea ecx, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4e23d0
sub eax, ecx
lea ecx, [eax - 1]
test ecx, ecx
je 0x4e23ef
dec ecx
cmp byte [esi + ecx], 0x5c
je 0x4e2495
test ecx, ecx
jne 0x4e23e0
lea eax, [esp + 0x428]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edi, [esp + 0x428]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4e2410
mov cx, word [0x5736b4]
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
mov word [edi], cx
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4e2430
lea edi, [esp + 0x428]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4e2443
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
cmp dword [esp + 0x830], 2
jl 0x4e26ea
mov esi, dword [edi + 4]
mov ecx, str._excute
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4e24bc
test dl, dl
je 0x4e2491
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4e24bc
add eax, 2
add ecx, 2
test dl, dl
jne 0x4e2475
xor eax, eax
jmp 0x4e24c1
lea edi, [esp + 0x428]
mov eax, esi
sub edi, esi
mov dl, byte [eax]
mov byte [edi + eax], dl
inc eax
test dl, dl
jne 0x4e24a0
mov edi, dword [esp + 0x14]
mov byte [esi + ecx], dl
mov edx, dword [edi]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x4e245d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4e24f8
mov esi, dword [esp + 0x10]
push esi
push ebx
mov ecx, 0x109c508
call fcn.004f59c0
test al, al
jne 0x4e2723
test esi, esi
je 0x4e24f1
push str.pServerApp__StartApplication
push 1
push 3
mov ecx, esi
call fcn.004f0300
xor al, al
jmp 0x4e272b
mov ecx, str._install
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4e2520
test dl, dl
je 0x4e251c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4e2520
add eax, 2
add ecx, 2
test dl, dl
jne 0x4e2500
xor eax, eax
jmp 0x4e2525
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4e257b
push 3
lea eax, [ebp + str.Shaiya_Session_Server]
push eax
lea ecx, [ebp + 0x56a528]
push ecx
push ebx
lea edx, [esp + 0x438]
push edx
mov ecx, 0x109c9b8
call fcn.004f54f0
mov ecx, 0x109c9b8
call fcn.004f5620
test al, al
jne 0x4e271f
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4e2574
push str.pServerApp__SCInstall
push 1
push 3
call fcn.004f0300
xor al, al
jmp 0x4e272b
mov ecx, str._uninstall
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4e25a2
test dl, dl
je 0x4e259e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4e25a2
add eax, 2
add ecx, 2
test dl, dl
jne 0x4e2582
xor eax, eax
jmp 0x4e25a7
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4e25fd
push 3
lea eax, [ebp + str.Shaiya_Session_Server]
push eax
lea ecx, [ebp + 0x56a528]
push ecx
push ebx
lea edx, [esp + 0x438]
push edx
mov ecx, 0x109c9b8
call fcn.004f54f0
mov ecx, 0x109c9b8
call fcn.004f5710
test al, al
jne 0x4e271f
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4e25f6
push str.pServerApp__SCUninstall
push 1
push 3
call fcn.004f0300
xor al, al
jmp 0x4e272b
push str._start
push esi
call fcn.0051b864
add esp, 8
test eax, eax
jne 0x4e2661
push 3
lea eax, [ebp + str.Shaiya_Session_Server]
push eax
lea ecx, [ebp + 0x56a528]
push ecx
push ebx
lea edx, [esp + 0x438]
push edx
mov ecx, 0x109c9b8
call fcn.004f54f0
mov ecx, 0x109c9b8
call fcn.004f57e0
test al, al
jne 0x4e2712
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4e265a
push str.pServerApp__SCStart
push 1
push 3
call fcn.004f0300
xor al, al
jmp 0x4e272b
mov eax, dword [edi + 4]
push str._stop
push eax
call fcn.0051b864
add esp, 8
test eax, eax
jne 0x4e26c1
push 3
lea ecx, [ebp + str.Shaiya_Session_Server]
push ecx
lea edx, [ebp + 0x56a528]
push edx
push ebx
lea eax, [esp + 0x438]
push eax
mov ecx, 0x109c9b8
call fcn.004f54f0
mov ecx, 0x109c9b8
call fcn.004f58b0
test al, al
jne 0x4e2712
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4e26bd
push str.pServerApp__SCStop
push 1
push 3
call fcn.004f0300
xor al, al
jmp 0x4e272b
mov ecx, dword [edi + 4]
push str._local
push ecx
call fcn.0051b864
add esp, 8
test eax, eax
jne 0x4e2712
mov edx, dword [0x109c508]
mov eax, dword [edx + 0x1c]
mov ecx, 0x109c508
call eax
xor al, al
jmp 0x4e272b
mov esi, dword [esp + 0x10]
push esi
push ebx
mov ecx, 0x109c508
call fcn.004f5a00
test al, al
jne 0x4e2716
test esi, esi
je 0x4e2712
push str.pServerApp__StartService
push 1
push 3
mov ecx, esi
call fcn.004f0300
xor al, al
jmp 0x4e272b
mov byte [0x587be2], 1
jmp 0x4e2723
mov esi, dword [esp + 0x10]
mov dword [0x587c40], esi
mov al, 1
mov ecx, dword [esp + 0x828]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
call fcn.0051a8be
add esp, 0x81c
ret