Function at 0x401170
Capabilities:
Create process on windows
Get common file path

Disassembly:
mov eax, 0x11ce0
call fcn.0040eb80
mov eax, dword [0x416004]
xor eax, esp
mov dword [esp + 0x11cdc], eax
push ebx
push ebp
mov ebp, dword [esp + 0x11cec]
lea eax, [esp + 0x14d0]
push esi
push edi
push eax
push 0x400
mov dword [esp + 0x1ce0], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [esp + 0x1cd8], eax
lea eax, [esp + 0x70]
push 0x104
push eax
push 0
mov dword [esp + 0x284], 0
call ebx
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [esp + 0x70]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401210
sub ecx, edx
sar ecx, 1
mov dword [esp + 0x278], ecx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x401256
push 1
lea eax, [esp + 0x74]
lea eax, [eax + ecx*2]
push 0x413e10
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x284]
add esp, 0xc
inc ecx
mov dword [esp + 0x278], ecx
lea eax, [ecx + 3]
cmp eax, 0x104
jae 0x401288
push 3
lea eax, [esp + 0x74]
lea eax, [eax + ecx*2]
push 0x413d08
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x284]
add esp, 0xc
add ecx, 3
mov dword [esp + 0x278], ecx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x4012b8
push 1
lea eax, [esp + 0x74]
lea eax, [eax + ecx*2]
push 0x413e10
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x284]
add esp, 0xc
inc ecx
mov dword [esp + 0x278], ecx
lea eax, [ecx + 0xf]
cmp eax, 0x104
jae 0x4012e1
push 0xf
lea eax, [esp + 0x74]
lea eax, [eax + ecx*2]
push str.w3x2lni_lua.exe
push eax
call fcn.00405e05
add esp, 0xc
add dword [esp + 0x278], 0xf
push 0x104
lea eax, [esp + 0x494]
mov dword [esp + 0x69c], 0
push eax
mov ecx, 0x83
lea esi, [esp + 0x78]
lea edi, [esp + 0x8b8]
rep movsd dword es:[edi], dword [esi]
push 0
call ebx
lea eax, [esp + 0x490]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
lea eax, [esp + 0x490]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
lea eax, [esp + 0x490]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [esp + 0x490]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [esp + 0x490]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401351
sub ecx, edx
sar ecx, 1
mov dword [esp + 0x698], ecx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x40139a
push 1
lea eax, [esp + 0x494]
lea eax, [eax + ecx*2]
push 0x413e10
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x6a4]
add esp, 0xc
inc ecx
mov dword [esp + 0x698], ecx
lea eax, [ecx + 6]
cmp eax, 0x104
jae 0x4013c6
push 6
lea eax, [esp + 0x494]
lea eax, [eax + ecx*2]
push str.script
push eax
call fcn.00405e05
add esp, 0xc
add dword [esp + 0x698], 6
lea eax, [esp + 0x8b0]
mov dword [esp + 0x11ce0], 0
mov dword [esp + 0x10], eax
lea esi, [esp + 0x490]
mov eax, dword [esp + 0xab8]
lea edi, [esp + 0xac0]
mov ecx, 0x83
mov dword [esp + 0x14], eax
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1ce4]
call fcn.00402770
mov ecx, dword [esp + 0x11ce0]
lea eax, [ecx + 0x10]
cmp eax, 0x8000
jae 0x401449
push 0x10
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push str.__e___W2L_MODE
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
add ecx, 0x10
mov dword [esp + 0x11ce0], ecx
lea eax, [ecx + 3]
cmp eax, 0x8000
jae 0x40147e
push 3
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push 0x413e14
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
add ecx, 3
mov dword [esp + 0x11ce0], ecx
lea eax, [ecx + 0x12]
cmp eax, 0x8000
jae 0x4014b3
push 0x12
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push str.___e___W2L_DIR__
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
add ecx, 0x12
mov dword [esp + 0x11ce0], ecx
mov esi, dword [esp + 0x1cd8]
lea eax, [esi + ecx]
cmp eax, 0x8000
jae 0x4014f0
push esi
lea eax, [esp + 0x14dc]
push eax
lea eax, [esp + 0x1ce8]
lea eax, [eax + ecx*2]
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
add ecx, esi
mov dword [esp + 0x11ce0], ecx
lea eax, [ecx + 8]
cmp eax, 0x8000
jae 0x40151c
push 8
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push str._____E__
push eax
call fcn.00405e05
add esp, 0xc
add dword [esp + 0x11ce0], 8
push 0x104
lea eax, [esp + 0x284]
mov dword [esp + 0x48c], 0
push eax
push 0
call ebx
lea eax, [esp + 0x280]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
lea eax, [esp + 0x280]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
lea eax, [esp + 0x280]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [esp + 0x280]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea esi, [esp + 0x280]
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401580
sub esi, ecx
sar esi, 1
mov dword [esp + 0x488], esi
lea eax, [esi + 1]
cmp eax, 0x104
jae 0x4015c9
push 1
lea eax, [esp + 0x284]
lea eax, [eax + esi*2]
push 0x413e10
push eax
call fcn.00405e05
mov esi, dword [esp + 0x494]
add esp, 0xc
inc esi
mov dword [esp + 0x488], esi
lea eax, [esi + 6]
cmp eax, 0x104
jae 0x4015fe
push 6
lea eax, [esp + 0x284]
lea eax, [eax + esi*2]
push str.script
push eax
call fcn.00405e05
mov esi, dword [esp + 0x494]
add esp, 0xc
add esi, 6
mov dword [esp + 0x488], esi
lea eax, [esi + 1]
cmp eax, 0x104
jae 0x401631
push 1
lea eax, [esp + 0x284]
lea eax, [eax + esi*2]
push 0x413e10
push eax
call fcn.00405e05
mov esi, dword [esp + 0x494]
add esp, 0xc
inc esi
mov dword [esp + 0x488], esi
lea eax, [esi + 8]
cmp eax, 0x104
jae 0x401666
push 8
lea eax, [esp + 0x284]
lea eax, [eax + esi*2]
push str.main.lua
push eax
call fcn.00405e05
mov esi, dword [esp + 0x494]
add esp, 0xc
add esi, 8
mov dword [esp + 0x488], esi
mov ecx, dword [esp + 0x11ce0]
lea eax, [esi + ecx]
cmp eax, 0x8000
jae 0x4016a3
push esi
lea eax, [esp + 0x284]
push eax
lea eax, [esp + 0x1ce8]
lea eax, [eax + ecx*2]
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
add ecx, esi
mov dword [esp + 0x11ce0], ecx
lea eax, [ecx + 1]
cmp eax, 0x8000
jae 0x4016ce
push 1
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push 0x413db4
push eax
call fcn.00405e05
add esp, 0xc
inc dword [esp + 0x11ce0]
mov ebx, 1
call fcn.00405df9
cmp dword [eax], ebx
jle 0x401893
mov ecx, dword [esp + 0x11ce0]
lea eax, [ecx + 1]
cmp eax, 0x8000
jae 0x401712
push 1
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push 0x413db8
push eax
call fcn.00405e05
add esp, 0xc
inc dword [esp + 0x11ce0]
call fcn.00405dff
mov eax, dword [eax]
mov edi, dword [eax + ebx*4]
mov esi, edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401721
sub esi, ecx
sar esi, 1
je 0x4017f1
cmp word [edi + esi*2 - 2], 0x5c
jne 0x4017f1
cmp esi, 1
je 0x401753
cmp word [edi + esi*2 - 4], 0x5c
je 0x4017f1
mov ecx, dword [esp + 0x11ce0]
lea eax, [ecx + 1]
cmp eax, 0x8000
jae 0x40178d
push 1
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push 0x413db4
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
inc ecx
mov dword [esp + 0x11ce0], ecx
lea eax, [esi + ecx]
cmp eax, 0x8000
jae 0x4017bc
push esi
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push edi
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
add ecx, esi
mov dword [esp + 0x11ce0], ecx
lea eax, [ecx + 2]
cmp eax, 0x8000
jae 0x401885
push 2
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push 0x413e08
push eax
call fcn.00405e05
add esp, 0xc
add dword [esp + 0x11ce0], 2
jmp 0x401885
mov ecx, dword [esp + 0x11ce0]
lea eax, [ecx + 1]
cmp eax, 0x8000
jae 0x40182b
push 1
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push 0x413db4
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
inc ecx
mov dword [esp + 0x11ce0], ecx
lea eax, [esi + ecx]
cmp eax, 0x8000
jae 0x40185a
push esi
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push edi
push eax
call fcn.00405e05
mov ecx, dword [esp + 0x11cec]
add esp, 0xc
add ecx, esi
mov dword [esp + 0x11ce0], ecx
lea eax, [ecx + 1]
cmp eax, 0x8000
jae 0x401885
push 1
lea eax, [esp + 0x1ce4]
lea eax, [eax + ecx*2]
push 0x413db4
push eax
call fcn.00405e05
add esp, 0xc
inc dword [esp + 0x11ce0]
inc ebx
call fcn.00405df9
cmp ebx, dword [eax]
jl 0x4016e0
push 5
lea eax, [esp + 0xcd4]
mov dword [esp + 0x14d4], 0
push 0x413dbc
push eax
call fcn.00405e05
add dword [esp + 0x14dc], 5
lea eax, [esp + 0x6ac]
add esp, 0xc
mov dword [esp + 0x8a8], 0
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x6a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
lea eax, [esp + 0x6a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
lea eax, [esp + 0x6a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [esp + 0x6a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea esi, [esp + 0x6a0]
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401920
sub esi, ecx
sar esi, 1
mov dword [esp + 0x8a8], esi
lea eax, [esi + 1]
cmp eax, 0x104
jae 0x401969
push 1
lea eax, [esp + 0x6a4]
lea eax, [eax + esi*2]
push 0x413e10
push eax
call fcn.00405e05
mov esi, dword [esp + 0x8b4]
add esp, 0xc
inc esi
mov dword [esp + 0x8a8], esi
lea eax, [esi + 3]
cmp eax, 0x104
jae 0x40199e
push 3
lea eax, [esp + 0x6a4]
lea eax, [eax + esi*2]
push 0x413d08
push eax
call fcn.00405e05
mov esi, dword [esp + 0x8b4]
add esp, 0xc
add esi, 3
mov dword [esp + 0x8a8], esi
mov edi, dword [esp + 0x14d0]
lea eax, [esi + edi]
cmp eax, 0x400
jae 0x4019db
push esi
lea eax, [esp + 0x6a4]
push eax
lea eax, [esp + 0xcd8]
lea eax, [eax + edi*2]
push eax
call fcn.00405e05
mov edi, dword [esp + 0x14dc]
add esp, 0xc
add edi, esi
mov dword [esp + 0x14d0], edi
lea eax, [edi + 1]
cmp eax, 0x400
jae 0x401a0e
push 1
lea eax, [esp + 0xcd4]
lea eax, [eax + edi*2]
push 0x413dc8
push eax
call fcn.00405e05
mov edi, dword [esp + 0x14dc]
add esp, 0xc
inc edi
mov dword [esp + 0x14d0], edi
push 0x40
lea eax, [esp + 0x30]
mov dword [esp + 0x2c], 0x44
xorps xmm0, xmm0
push 0
push eax
movups xmmword [esp + 0x24], xmm0
call fcn.004043b0
add esp, 0xc
mov dword [esp + 0x54], pe_nt_image_headers32
mov dword [esp + 0x60], 0xffffffff
mov dword [esp + 0x64], 0xffffffff
mov dword [esp + 0x68], 0xffffffff
test ebp, ebp
je 0x401a61
mov eax, dword [ebp + 4]
mov dword [esp + 0x68], eax
mov dword [ebp + 4], 0
mov eax, dword [esp + 0xcc8]
xor ecx, ecx
mov word [esp + eax*2 + 0xac0], cx
xor eax, eax
mov word [esp + edi*2 + 0xcd0], ax
mov eax, dword [esp + 0x11ce0]
mov word [esp + eax*2 + 0x1ce0], cx
mov eax, dword [esp + 0xab8]
mov word [esp + eax*2 + 0x8b0], cx
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0xac8]
push eax
lea eax, [esp + 0xcdc]
push eax
push 0x8000420
push 1
push ecx
push ecx
lea eax, [esp + 0x1d00]
push eax
lea eax, [esp + 0x8d4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x401adb
xor al, al
jmp 0x401b01
push dword [esp + 0x60]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x64]
call esi
push dword [esp + 0x68]
call esi
push dword [esp + 0x1c]
call esi
push dword [esp + 0x18]
call esi
mov al, 1
mov ecx, dword [esp + 0x11cec]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00402e4d
add esp, 0x11ce0
ret