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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
push 0x44
xor edi, edi
lea eax, [esp + 0x6c]
push edi
push eax
call fcn.00412800
xor eax, eax
add esp, 0xc
mov ecx, 1
xor ebx, ebx
mov dword [esp + 0x68], 0x44
mov dword [esp + 0x94], 1
mov word [esp + 0x98], cx
mov dword [esp + 0x24], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
cmp byte [ebp + 0x10], al
je 0x46b210
mov edx, dword [esi + 4]
mov ecx, dword [edx + 0xc]
call fcn.0040c480
cmp dword [esi + 8], 7
mov dword [esp + 0x20], eax
jbe 0x46b202
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x1c]
call fcn.0040c480
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + 0x1c]
mov edi, eax
and edi, 0xffff0000
call fcn.0040c480
and eax, 0xffff
mov dword [esp + 0x1c], eax
cmp dword [esi + 8], 6
jbe 0x46b256
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + 0x18]
jmp 0x46b249
cmp dword [esi + 8], 3
jbe 0x46b23d
mov edx, dword [esi + 4]
mov ecx, dword [edx + 0xc]
call fcn.0040c480
mov edi, eax
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0xc]
and edi, 0xffff0000
call fcn.0040c480
and eax, 0xffff
mov dword [esp + 0x1c], eax
cmp dword [esi + 8], 2
jbe 0x46b256
mov edx, dword [esi + 4]
mov ecx, dword [edx + 8]
call fcn.0040c480
mov word [esp + 0x98], ax
test edi, 0x10000
je 0x46b266
mov dword [esp + 0x18], 0x10
mov eax, dword [esi + 4]
mov eax, dword [eax]
push eax
call fcn.0045775b
mov edi, eax
call fcn.004101a0
cmp byte [ebp + 0x10], bl
je 0x46b3c6
mov ecx, dword [esi + 4]
mov dword [esp + 0x28], eax
mov eax, dword [ecx + 4]
push eax
call fcn.0045775b
mov edi, eax
call fcn.004101a0
mov edx, dword [esi + 4]
mov dword [esp + 0x24], eax
mov eax, dword [edx + 8]
push eax
call fcn.0045775b
mov edi, eax
call fcn.004101a0
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x10]
push eax
call fcn.0045775b
mov edi, eax
call fcn.004101a0
cmp dword [esi + 8], 5
mov dword [esp + 0x14], eax
jbe 0x46b2f6
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 0x14]
push eax
call fcn.0045775b
mov edi, eax
call fcn.004101a0
mov edi, eax
test edi, edi
je 0x46b2f6
push edi
call fcn.00412781
add esp, 4
test eax, eax
jne 0x46b328
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ebx, eax
xor ecx, ecx
lea eax, [ebx + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004128c9
add esp, 4
mov edi, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, dword [esi + 4]
mov ebx, dword [ecx]
mov eax, 0x4946c4
call fcn.0040e4f0
mov edx, dword [esi + 4]
mov ebx, dword [edx + 4]
mov eax, 0x4946c4
call fcn.0040e4f0
mov ecx, dword [esi + 4]
mov ebx, dword [ecx + 8]
mov eax, 0x4946c4
call fcn.0040e4f0
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x1c]
push esi
lea edx, [esp + 0x44]
push edx
call fcn.004365c7
test esi, esi
je 0x46b3bf
lea eax, [esp + 0x40]
push eax
mov byte [esp + 0x12], 1
call fcn.0044767c
mov dword [esp + 0xa4], eax
cmp eax, 0xffffffff
jne 0x46b38e
mov byte [esp + 0xe], 0
lea ecx, [esp + 0x40]
push ecx
call fcn.00447646
mov dword [esp + 0xa8], eax
cmp eax, 0xffffffff
jne 0x46b3a9
mov byte [esp + 0xe], 0
lea edx, [esp + 0x40]
push edx
call fcn.0044762e
mov dword [esp + 0xa0], eax
cmp eax, 0xffffffff
jne 0x46b431
mov byte [esp + 0xe], 0
jmp 0x46b443
cmp dword [esi + 8], 1
mov dword [esp + 0x14], eax
jbe 0x46b3fa
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 4]
push eax
call fcn.0045775b
mov edi, eax
call fcn.004101a0
mov edi, eax
test edi, edi
je 0x46b3fa
push edi
call fcn.00412781
add esp, 4
test eax, eax
jne 0x46b35b
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004128c9
add esp, 4
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x46b35b
cmp byte [esp + 0xe], 0
je 0x46b443
or dword [esp + 0x94], 0x100
cmp byte [ebp + 0x10], 0
je 0x46b4f1
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x28]
push edi
push edx
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
push esi
push ebx
call fcn.004590f2
push ebx
mov byte [esp + 0x13], al
call fcn.00412781
add esp, 4
mov ecx, ebx
test eax, eax
je 0x46b491
mov byte [ecx], 0
inc ecx
dec eax
jne 0x46b48a
push esi
call fcn.00412781
add esp, 4
mov ecx, esi
test eax, eax
je 0x46b4ac
jmp 0x46b4a5
mov byte [ecx], 0
inc ecx
dec eax
jne 0x46b4a5
mov eax, dword [esp + 0x10]
push eax
call fcn.00412781
mov ecx, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x46b4cc
lea esp, [esp]
mov byte [ecx], 0
inc ecx
dec eax
jne 0x46b4c5
push ebx
call fcn.00410eb6
add esp, 4
push esi
call fcn.00410eb6
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call fcn.00410eb6
mov bl, byte [esp + 0x13]
add esp, 4
jmp 0x46b51f
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x30]
push edx
movzx edx, byte [esp + 0x12]
lea eax, [esp + 0x6c]
push eax
mov eax, dword [esp + 0x1c]
push edi
push 0
push ecx
push edx
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
setne bl
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00410eb6
add esp, 4
push edi
call fcn.00410eb6
add esp, 4
test bl, bl
jne 0x46b58b
mov esi, dword [ebp + 8]
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 0
push 1
add eax, esi
call fcn.00403a80
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi]
mov eax, dword [eax + 4]
add eax, esi
call fcn.00403ac0
mov esi, dword [ebp + 0x18]
call fcn.00408d30
lea ecx, [esp + 0x40]
push ecx
mov dword [esi + 8], 1
mov dword [esi], 0
call fcn.0044f8a5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edx, dword [esp + 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
cmp byte [esp + 0xe], 0
je 0x46b5cf
lea eax, [esp + 0x40]
push eax
call fcn.004475ac
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x48], ecx
call fcn.0044f7ef
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x40]
push eax
add ecx, 0x468
push ecx
call fcn.0044e552
cmp byte [ebp + 0xc], 0
je 0x46b5f7
mov edx, dword [esp + 0x30]
mov eax, dword [ebp + 8]
mov dword [eax + 0x450], edx
lea eax, [esp + 0x40]
push eax
call fcn.0044f8a5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esp + 0x38]
fild dword [esp + 0x38]
test ecx, ecx
jns 0x46b609
fadd qword [0x49c838]
mov esi, dword [ebp + 0x18]
fstp qword [esp + 0x28]
call fcn.00408d30
fld qword [esp + 0x28]
mov edx, dword [esp + 0x30]
fstp qword [esi]
push edx
mov dword [esi + 8], 3
call edi
lea eax, [esp + 0x40]
push eax
call fcn.0044f8a5
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14