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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
mov eax, dword [0x5246a8]
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 0x456830
cmp esi, 5
je 0x456830
call fcn.0040e770
test eax, eax
jg 0x4566de
push 0
push 0x315
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
mov ebx, 1
call fcn.00450580
add eax, 8
push str.CreateProcessWAction:_STATUS_ACCESS_DENIED
push eax
call fcn.00441cc0
add esp, 8
test bl, 1
je 0x4566f1
lea ecx, [ebp - 0x11c]
and ebx, 0xfffffffe
call fcn.00450920
call fcn.0040e770
test eax, eax
jg 0x45673b
or ebx, 2
cmp dword [edi + 0x14], 8
jb 0x456707
mov esi, dword [edi]
jmp 0x456709
mov esi, edi
push 0
push 0x316
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.00450580
push esi
add eax, 8
push str.app_name:
push eax
call fcn.00441cc0
add esp, 8
push eax
call fcn.00450610
add esp, 8
test bl, 2
je 0x45674e
lea ecx, [ebp - 0x11c]
and ebx, 0xfffffffd
call fcn.00450920
call fcn.0040e770
mov edi, 8
test eax, eax
jg 0x45679b
mov esi, dword [ebp - 0x60]
or ebx, 4
cmp dword [esi + 0x14], edi
jb 0x456769
mov esi, dword [esi]
push 0
push 0x317
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.00450580
push esi
add eax, 8
push str.command_line:
push eax
call fcn.00441cc0
add esp, 8
push eax
call fcn.00450610
add esp, 8
test bl, 4
je 0x4567ae
lea ecx, [ebp - 0x11c]
and ebx, 0xfffffffb
call fcn.00450920
mov ecx, dword [0x527178]
push 0xb
lea eax, [ebp - 0x58]
push eax
call fcn.00437b5c
call fcn.0040e770
test eax, eax
jg 0x4567f9
push 0
push 0x319
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
or ebx, edi
call fcn.00450580
mov ecx, dword [ebp - 0x58]
cmp dword [ebp - 0x44], edi
jae 0x4567ec
lea ecx, [ebp - 0x58]
push ecx
add eax, 8
push eax
call fcn.00450610
add esp, 8
test bl, 8
je 0x456809
lea ecx, [ebp - 0x11c]
call fcn.00450920
cmp dword [ebp - 0x44], edi
jb 0x45681a
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00406d09
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.004b7180
mov eax, dword [ebp - 0x60]
add esp, 0xc
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x160], 0x44
jb 0x456858
mov eax, dword [eax]
push eax
call fcn.0040c957
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.0040c8a0
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x4568a1
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 0x10]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x456b82
cmp eax, dword [ebp - 0x10]
ja 0x456b82
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.0040c8a0
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x4568e7
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x456b34
cmp eax, dword [ebp - 0x2c]
ja 0x456b34
cmp dword [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
jae 0x45690f
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x456945
lea ecx, [ebp - 0x3c]
call fcn.00409ff0
lea ecx, [ebp - 0x20]
call fcn.00409ff0
lea ecx, [ebp - 0x5c]
call fcn.0043a840
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 0x456955
lea ecx, [ebp - 0x3c]
mov eax, dword [ebp - 0x64]
cmp dword [eax + 0x14], edx
jb 0x45695f
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.00456570
mov edi, 8
add esp, 0x34
mov esi, eax
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0xc], edi
jae 0x45699d
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
jne 0x45691a
call fcn.0040e770
test eax, eax
jg 0x4569df
push esi
push 0x34b
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
lea ebx, [esi + 0x10]
call fcn.00450580
add eax, 8
push str.CreateProcessWAction:_STATUS_ACCESS_DENIED
push eax
call fcn.00441cc0
add esp, 8
test bl, 0x10
je 0x4569f2
lea ecx, [ebp - 0x11c]
and ebx, 0xffffffef
call fcn.00450920
call fcn.0040e770
test eax, eax
jg 0x456a3a
mov esi, dword [ebp - 0x64]
or ebx, 0x20
cmp dword [esi + 0x14], edi
jb 0x456a08
mov esi, dword [esi]
push 0
push 0x34c
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.00450580
push esi
add eax, 8
push str.app_name:
push eax
call fcn.00441cc0
add esp, 8
push eax
call fcn.00450610
add esp, 8
test bl, 0x20
je 0x456a4d
lea ecx, [ebp - 0x11c]
and ebx, 0xffffffdf
call fcn.00450920
call fcn.0040e770
test eax, eax
jg 0x456a95
mov esi, dword [ebp - 0x60]
or ebx, 0x40
cmp dword [esi + 0x14], edi
jb 0x456a63
mov esi, dword [esi]
push 0
push 0x34d
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
call fcn.00450580
push esi
add eax, 8
push str.command_line:
push eax
call fcn.00441cc0
add esp, 8
push eax
call fcn.00450610
add esp, 8
test bl, 0x40
je 0x456aa8
lea ecx, [ebp - 0x11c]
and ebx, 0xffffffbf
call fcn.00450920
mov ecx, dword [0x527178]
push 0xb
lea edx, [ebp - 0x58]
push edx
call fcn.00437b5c
call fcn.0040e770
test eax, eax
jg 0x456aef
push 0
push 0x34f
push str.srcprocess_thread_policy.cc
lea ecx, [ebp - 0x11c]
or ebx, 0x80
call fcn.00450580
lea ecx, [ebp - 0x58]
push ecx
add eax, 8
push eax
call fcn.0044c960
add esp, 8
test bl, bl
jns 0x456afe
lea ecx, [ebp - 0x11c]
call fcn.00450920
lea ecx, [ebp - 0x58]
call fcn.00409ff0
lea ecx, [ebp - 0x3c]
call fcn.00409ff0
lea ecx, [ebp - 0x20]
call fcn.00409ff0
lea ecx, [ebp - 0x5c]
call fcn.0043a840
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 0x456b4a
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00406d09
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 0x456b70
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00406d09
add esp, 4
xor edx, edx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 0
mov word [ebp - 0x20], dx
jmp 0x456ba4
cmp dword [ebp - 0xc], 8
jb 0x456b94
mov eax, dword [ebp - 0x20]
push eax
call fcn.00406d09
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 0x456bb1
push edi
call fcn.00402cee
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