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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
mov eax, dword [0x522638]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x20]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x5c], ebx
cmp esi, 6
je 0x45e810
cmp esi, 5
je 0x45e810
call fcn.0040e750
test eax, eax
jg 0x45e6be
push 0
push 0x315
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
mov ebx, 1
call fcn.0040e760
add eax, 8
push str.CreateProcessWAction:_STATUS_ACCESS_DENIED
push eax
call fcn.00415d00
add esp, 8
test bl, 1
je 0x45e6d1
lea ecx, [ebp - 0x11c]
and ebx, 0xfffffffe
call fcn.004164a0
call fcn.0040e750
test eax, eax
jg 0x45e71b
or ebx, 2
cmp dword [edi + 0x14], 8
jb 0x45e6e7
mov esi, dword [edi]
jmp 0x45e6e9
mov esi, edi
push 0
push 0x316
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.0040e760
push esi
add eax, 8
push str.app_name:
push eax
call fcn.00415d00
add esp, 8
push eax
call fcn.00437fa0
add esp, 8
test bl, 2
je 0x45e72e
lea ecx, [ebp - 0x11c]
and ebx, 0xfffffffd
call fcn.004164a0
call fcn.0040e750
mov edi, 8
test eax, eax
jg 0x45e77b
mov esi, dword [ebp - 0x60]
or ebx, 4
cmp dword [esi + 0x14], edi
jb 0x45e749
mov esi, dword [esi]
push 0
push 0x317
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.0040e760
push esi
add eax, 8
push str.command_line:
push eax
call fcn.00415d00
add esp, 8
push eax
call fcn.00437fa0
add esp, 8
test bl, 4
je 0x45e78e
lea ecx, [ebp - 0x11c]
and ebx, 0xfffffffb
call fcn.004164a0
mov ecx, dword [0x52513c]
push 0xb
lea eax, [ebp - 0x58]
push eax
call fcn.0043e3fc
call fcn.0040e750
test eax, eax
jg 0x45e7d9
push 0
push 0x319
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
or ebx, edi
call fcn.0040e760
mov ecx, dword [ebp - 0x58]
cmp dword [ebp - 0x44], edi
jae 0x45e7cc
lea ecx, [ebp - 0x58]
push ecx
add eax, 8
push eax
call fcn.00437fa0
add esp, 8
test bl, 8
je 0x45e7e9
lea ecx, [ebp - 0x11c]
call fcn.004164a0
cmp dword [ebp - 0x44], edi
jb 0x45e7fa
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00406ca9
add esp, 4
pop edi
pop esi
mov eax, 5
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401306
mov esp, ebp
pop ebp
ret
push 0x40
lea edx, [ebp - 0x15c]
push 0
push edx
call fcn.004b8020
mov eax, dword [ebp - 0x60]
add esp, 0xc
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x160], 0x44
jb 0x45e838
mov eax, dword [eax]
push eax
call fcn.0040c758
mov edi, eax
add esp, 4
xor eax, eax
cmp esi, 6
sete al
and dword [ebp + 0x18], 0xc000420
xor ecx, ecx
push ecx
mov word [ebp - 0x20], cx
push 0x105
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x5c], edi
mov esi, eax
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x10], ebx
call fcn.0040c680
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x45e881
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 0x10]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x45eb62
cmp eax, dword [ebp - 0x10]
ja 0x45eb62
xor eax, eax
push eax
push 0x105
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], ebx
mov word [ebp - 0x3c], ax
call fcn.0040c680
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x45e8c7
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x45eb14
cmp eax, dword [ebp - 0x2c]
ja 0x45eb14
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x45e8ef
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x45e925
lea ecx, [ebp - 0x3c]
call fcn.00409f90
lea ecx, [ebp - 0x20]
call fcn.00409f90
lea ecx, [ebp - 0x5c]
call fcn.00442140
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401306
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x3c]
mov edx, 8
cmp dword [ebp - 0x28], edx
jae 0x45e935
lea ecx, [ebp - 0x3c]
mov eax, dword [ebp - 0x64]
cmp dword [eax + 0x14], edx
jb 0x45e93f
mov eax, dword [eax]
mov edx, dword [ebp - 0x6c]
push edx
lea edx, [ebp - 0x160]
push edx
mov edx, dword [ebp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x18]
push 0
push ecx
push edx
push 0
push 0
push edi
push eax
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax]
push esi
push ecx
push eax
call fcn.0045e550
mov edi, 8
add esp, 0x34
mov esi, eax
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0xc], edi
jae 0x45e97d
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
jne 0x45e8fa
call fcn.0040e750
test eax, eax
jg 0x45e9bf
push esi
push 0x34b
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
lea ebx, [esi + 0x10]
call fcn.0040e760
add eax, 8
push str.CreateProcessWAction:_STATUS_ACCESS_DENIED
push eax
call fcn.00415d00
add esp, 8
test bl, 0x10
je 0x45e9d2
lea ecx, [ebp - 0x11c]
and ebx, 0xffffffef
call fcn.004164a0
call fcn.0040e750
test eax, eax
jg 0x45ea1a
mov esi, dword [ebp - 0x64]
or ebx, 0x20
cmp dword [esi + 0x14], edi
jb 0x45e9e8
mov esi, dword [esi]
push 0
push 0x34c
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.0040e760
push esi
add eax, 8
push str.app_name:
push eax
call fcn.00415d00
add esp, 8
push eax
call fcn.00437fa0
add esp, 8
test bl, 0x20
je 0x45ea2d
lea ecx, [ebp - 0x11c]
and ebx, 0xffffffdf
call fcn.004164a0
call fcn.0040e750
test eax, eax
jg 0x45ea75
mov esi, dword [ebp - 0x60]
or ebx, 0x40
cmp dword [esi + 0x14], edi
jb 0x45ea43
mov esi, dword [esi]
push 0
push 0x34d
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.0040e760
push esi
add eax, 8
push str.command_line:
push eax
call fcn.00415d00
add esp, 8
push eax
call fcn.00437fa0
add esp, 8
test bl, 0x40
je 0x45ea88
lea ecx, [ebp - 0x11c]
and ebx, 0xffffffbf
call fcn.004164a0
mov ecx, dword [0x52513c]
push 0xb
lea edx, [ebp - 0x58]
push edx
call fcn.0043e3fc
call fcn.0040e750
test eax, eax
jg 0x45eacf
push 0
push 0x34f
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
or ebx, 0x80
call fcn.0040e760
lea ecx, [ebp - 0x58]
push ecx
add eax, 8
push eax
call fcn.00452930
add esp, 8
test bl, bl
jns 0x45eade
lea ecx, [ebp - 0x11c]
call fcn.004164a0
lea ecx, [ebp - 0x58]
call fcn.00409f90
lea ecx, [ebp - 0x3c]
call fcn.00409f90
lea ecx, [ebp - 0x20]
call fcn.00409f90
lea ecx, [ebp - 0x5c]
call fcn.00442140
pop edi
pop esi
mov eax, 5
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401306
mov esp, ebp
pop ebp
ret
mov ebx, 8
cmp dword [ebp - 0x28], ebx
jb 0x45eb2a
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00406ca9
add esp, 4
xor eax, eax
mov esi, 7
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], ax
cmp dword [ebp - 0xc], ebx
jb 0x45eb50
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00406ca9
add esp, 4
xor edx, edx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 0
mov word [ebp - 0x20], dx
jmp 0x45eb84
cmp dword [ebp - 0xc], 8
jb 0x45eb74
mov eax, dword [ebp - 0x20]
push eax
call fcn.00406ca9
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x10], ebx
mov word [ebp - 0x20], cx
test edi, edi
je 0x45eb91
push edi
call fcn.00402cae
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00401306
mov esp, ebp
pop ebp
ret