Function at 0x586910
Capabilities:
Check if file exists
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d36f3
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x638fe4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x22c], ebx
mov eax, ecx
mov dword [ebp - 0x234], eax
push dword [eax]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x228], 0x20
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x586f6f
mov eax, dword [ebp + 0xc]
sub eax, 0
je 0x586d95
sub eax, 1
je 0x586b24
sub eax, 1
jne 0x586d8b
mov eax, dword [ebp + 8]
mov edi, dword [eax]
cmp edi, dword [eax + 4]
je 0x586d8b
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004035b0
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
mov dword [ebp - 4], 7
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5869df
push 0x104
lea ecx, [ebp - 0x220]
call fcn.00402cf0
mov esi, dword [ebp - 0x220]
push 0x104
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x586a17
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x586b1a
cmp eax, dword [esi - 8]
jg 0x586b1a
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x230]
push ebx
push eax
call fcn.004030d0
add esp, 0xc
push 5
push 0
push dword [eax]
mov eax, dword [ebp - 0x234]
push dword [eax]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov edx, dword [ebp - 0x230]
mov ebx, eax
add edx, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x586aae
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x224], ecx
mov ecx, dword [edx]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x586aa8
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov esi, dword [eax + 4]
mov dword [ebp - 0x224], esi
mov esi, dword [ebp - 0x220]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x586aa0
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x586aae
call dword [ebp - 0x224]
jmp 0x586aae
call dword [ebp - 0x224]
cmp ebx, dword [ebp - 0x228]
jge 0x586abc
mov dword [ebp - 0x228], ebx
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x586b00
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x586afe
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x586afe
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x586b00
call edx
mov eax, dword [ebp + 8]
add edi, 0x1c
cmp edi, dword [eax + 4]
je 0x586f69
mov ebx, dword [ebp - 0x22c]
jmp 0x586997
push 0x80070057
call fcn.00402650
mov eax, dword [ebp + 8]
mov edi, dword [eax]
cmp edi, dword [eax + 4]
je 0x586d57
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004035b0
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
mov dword [ebp - 4], 3
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x586b80
push 0x104
lea ecx, [ebp - 0x220]
call fcn.00402cf0
mov esi, dword [ebp - 0x220]
push 0x104
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x586c42
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x586b1a
cmp eax, dword [esi - 8]
jg 0x586b1a
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
lea eax, [ebp - 0x220]
push 0x60e348
push eax
lea eax, [ebp - 0x230]
push eax
call fcn.004087e0
add esp, 0xc
mov ecx, dword [ebp - 0x22c]
mov byte [ebp - 4], 4
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00403780
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x230]
add ecx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x586d02
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x586cf8
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x586cf8
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [edx + 4]
call ebx
jmp 0x586d02
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x228]
push 0x60e354
push eax
call fcn.004086f0
add esp, 0xc
push 0x60e34c
push eax
lea eax, [ebp - 0x224]
mov byte [ebp - 4], 5
push eax
call fcn.004087e0
add esp, 0xc
mov ecx, dword [ebp - 0x22c]
mov byte [ebp - 4], 6
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00403780
mov byte [ebp - 4], 5
or eax, 0xffffffff
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x586ce9
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x586cdf
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x586cdf
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [edx + 4]
call ebx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x228]
jmp 0x586bf6
mov ecx, edx
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x228]
jmp 0x586bf6
mov ecx, edx
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x586d42
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x586d40
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x586d40
push 0
push dword [ecx + 4]
call ebx
jmp 0x586d42
call edx
mov eax, dword [ebp + 8]
add edi, 0x1c
cmp edi, dword [eax + 4]
jne 0x586b38
mov ebx, dword [ebp - 0x22c]
mov eax, dword [ebx]
mov ecx, ebx
push 1
mov eax, dword [eax - 0xc]
dec eax
push eax
call fcn.00408b40
mov eax, dword [ebp - 0x234]
push 5
push 0
push dword [ebx]
push dword [eax]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jl 0x586f6f
mov eax, 0x20
jmp 0x586f6f
push 0x20005
mov edx, esi
lea ecx, [ebp - 0x224]
call fcn.005b5f80
add esp, 4
xor edx, edx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x224]
call fcn.005b0a70
mov edi, dword [ebp - 0x224]
cmp dword [edi - 0xc], 0
jne 0x586e25
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.ListFile.txt
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x230]
call fcn.00403280
push eax
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 1
call fcn.00403220
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 0
call fcn.00402b90
mov edi, dword [ebp - 0x224]
mov eax, dword [ebx]
sub eax, 0x10
push eax
call fcn.004035b0
add esp, 4
lea ebx, [eax + 0x10]
mov dword [ebp - 0x230], ebx
push edi
push ebx
push str._s__d__s_
push dword [ebp - 0x22c]
mov byte [ebp - 4], 2
call fcn.00402e70
push str.w_ccsUTF_8
lea eax, [ebp - 0x220]
mov dword [ebp - 0x220], 0
push edi
push eax
call fcn.0054ca3b
mov eax, dword [ebp - 0x220]
add esp, 0x1c
test eax, eax
je 0x586ebe
mov ecx, dword [ebp + 8]
mov esi, dword [ecx]
cmp esi, dword [ecx + 4]
je 0x586eab
mov edi, ecx
push dword [esi]
push 0x60dcec
push eax
call fcn.004059b0
mov eax, dword [ebp - 0x220]
add esi, 0x1c
add esp, 0xc
cmp esi, dword [edi + 4]
jne 0x586e87
mov edi, dword [ebp - 0x224]
push eax
call fcn.0054caf8
add esp, 4
mov dword [ebp - 0x220], 0
mov eax, dword [ebp - 0x22c]
push 5
push 0
push dword [eax]
mov eax, dword [ebp - 0x234]
push dword [eax]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jge 0x586eea
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 0
add ebx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jg 0x586f2d
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x586f2b
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x586f2b
push 0
push dword [ecx + 4]
call esi
jmp 0x586f2d
call edx
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x586f69
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x586f8b
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x586f8b
push 0
push dword [ecx + 4]
call esi
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00544774
mov esp, ebp
pop ebp
ret
call edx
jmp 0x586f69