Function at 0x512690
Capabilities:
Check if file exists
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x582abf
mov eax, dword fs:[0]
push eax
sub esp, 0x860
mov eax, dword [0x5fc150]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 9
push 0x110a
push dword [edi + 0x74]
call esi
mov ecx, dword [ebp + 8]
mov ebx, eax
add ecx, 0xfffff249
cmp ecx, 9
ja case.default.0x5126e8
jmp dword [ecx*4 + 0x512c14]
test ebx, ebx
je case.default.0x5126e8
lea esi, [edi + 0x68]
push ebx
mov ecx, esi
mov dword [ebp - 0x864], esi
call fcn.004f7d80
push ebx
mov ecx, esi
mov dword [ebp - 0x85c], eax
call fcn.004cf350
test eax, eax
jne case.default.0x5126e8
mov ecx, dword [ebp - 0x85c]
test ecx, ecx
je case.default.0x5126e8
mov eax, dword [edi + 0xb8]
lea edx, [edi + 0xb4]
sub eax, dword [edx]
xor esi, esi
sar eax, 2
mov dword [ebp - 0x860], edx
mov dword [ebp - 0x868], eax
test eax, eax
je case.default.0x5126e8
mov eax, dword [edx]
mov edi, eax
mov dword [ebp - 0x86c], eax
lea ecx, [ecx]
mov eax, dword [edi]
push ecx
add eax, 0x34
push eax
call fcn.004c2150
add esp, 8
test al, al
jne 0x51278a
mov ecx, dword [ebp - 0x85c]
inc esi
add edi, 4
cmp esi, dword [ebp - 0x868]
jb 0x512760
jmp case.default.0x5126e8
mov ecx, dword [ebp - 0x86c]
shl esi, 2
mov ecx, dword [ecx + esi]
call fcn.00514040
mov ecx, dword [ebp - 0x860]
mov eax, dword [ecx]
add eax, esi
push eax
lea eax, [ebp - 0x860]
push eax
call fcn.00482e80
mov ecx, dword [ebp - 0x864]
push ebx
call fcn.004f80f0
jmp case.default.0x5126e8
test ebx, ebx
je case.default.0x5126e8
push ebx
lea eax, [ebp - 0x828]
mov ecx, edi
push eax
call fcn.00511430
mov dword [ebp - 4], 0
cmp dword [ebp - 0x814], 8
mov eax, dword [ebp - 0x828]
jae 0x5127f6
lea eax, [ebp - 0x828]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x512be3
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00544020
add esp, 0xc
mov ecx, edi
push ebx
call fcn.00511750
cmp eax, 3
mov eax, dword [ebp - 0x828]
jne 0x512845
cmp dword [ebp - 0x814], 8
jae 0x51283d
lea eax, [ebp - 0x828]
push eax
push str.explorer__select___s_
jmp 0x51285a
cmp dword [ebp - 0x814], 8
jae 0x512854
lea eax, [ebp - 0x828]
push eax
push str.explorer___s_
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x810]
lea ecx, [ebp - 0x858]
push eax
call fcn.0050e5d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x858]
push 0
call fcn.004d3720
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x858]
call fcn.00466460
jmp 0x512be3
test ebx, ebx
je case.default.0x5126e8
push ebx
mov ecx, edi
call fcn.00511750
cmp eax, 3
jne 0x5128c1
push ebx
lea ecx, [edi + 0x68]
call fcn.004cf350
mov ebx, eax
push ebx
lea eax, [ebp - 0x828]
mov ecx, edi
push eax
call fcn.00511430
mov dword [ebp - 4], 2
cmp dword [ebp - 0x814], 8
mov eax, dword [ebp - 0x828]
jae 0x5128ec
lea eax, [ebp - 0x828]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x512be3
call fcn.0040baa0
add eax, 0x290
cmp dword [eax + 0x14], 8
jb 0x51290d
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x858]
call fcn.004029a0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x858]
push eax
lea ecx, [ebp - 0x840]
call fcn.0048cbd0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x858]
call fcn.004038c0
cmp dword [ebp - 0x814], 8
mov eax, dword [ebp - 0x828]
jae 0x512953
lea eax, [ebp - 0x828]
push eax
push 0
lea ecx, [ebp - 0x840]
call fcn.004d3740
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x840]
call fcn.00466460
jmp 0x512be3
test ebx, ebx
je case.default.0x5126e8
push ebx
lea eax, [ebp - 0x840]
mov ecx, edi
push eax
call fcn.00511430
mov dword [ebp - 4], 6
push dword [edi + 8]
lea eax, [ebp - 0x840]
push eax
call fcn.00426ea0
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x840]
jmp 0x512bf0
test ebx, ebx
je case.default.0x5126e8
push ebx
lea eax, [ebp - 0x840]
mov ecx, edi
push eax
call fcn.005112d0
mov dword [ebp - 4], 7
jmp 0x512993
test ebx, ebx
je case.default.0x5126e8
push ebx
lea eax, [ebp - 0x828]
mov ecx, edi
push eax
call fcn.00511430
mov dword [ebp - 4], 8
cmp dword [ebp - 0x814], 8
mov eax, dword [ebp - 0x828]
jae 0x512a0a
lea eax, [ebp - 0x828]
push 0
push eax
push 0x805
push dword [edi + 8]
call esi
jmp 0x512be3
mov ecx, edi
call fcn.005125a0
jmp case.default.0x5126e8
mov ebx, dword [edi + 0xb8]
sub ebx, dword [edi + 0xb4]
sar ebx, 2
sub ebx, 1
js case.default.0x5126e8
mov eax, dword [edi + 0xb4]
lea ecx, [ebx*4]
mov esi, dword [ecx + eax]
push dword [esi + 0x54]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [esi + 0x50]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x54]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0xb4]
lea esi, [ebx*4]
mov ecx, edi
mov eax, dword [eax + esi]
add eax, 0x34
push eax
call fcn.005117b0
test eax, eax
je 0x512a93
push eax
lea ecx, [edi + 0x68]
call fcn.004f80f0
mov eax, dword [edi + 0xb4]
mov ecx, dword [edi + 0xb8]
add eax, esi
lea edx, [eax + 4]
sub ecx, edx
push ecx
push edx
push eax
call fcn.00543060
add dword [edi + 0xb8], 0xfffffffc
add esp, 0xc
sub ebx, 1
jns 0x512a40
jmp case.default.0x5126e8
call fcn.0040baa0
push str.SelectFolderFromBrowserString
push str.FolderAsWorkspace
push str.Select_a_folder_to_add_in_Folder_as_Workspace_panel
lea ecx, [ebp - 0x828]
push ecx
mov ecx, dword [eax + 0x234d8]
call fcn.0045fc60
mov dword [ebp - 4], 9
cmp dword [ebp - 0x814], 8
mov eax, dword [ebp - 0x828]
jae 0x512b04
lea eax, [ebp - 0x828]
push eax
lea ecx, [ebp - 0x840]
call fcn.004029a0
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x840]
push 0
push 0
push eax
push dword [edi + 8]
lea eax, [ebp - 0x858]
push eax
call fcn.00425040
add esp, 0x14
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x840]
call fcn.004038c0
cmp dword [ebp - 0x848], 0
je 0x512b6f
sub esp, 0x18
lea eax, [ebp - 0x858]
mov ecx, esp
mov dword [ebp - 0x864], esp
push eax
call fcn.00402970
mov byte [ebp - 4], 0xd
mov byte [ebp - 4], 0xc
mov ecx, edi
call fcn.0050fa20
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x858]
call fcn.004038c0
jmp 0x512be3
test ebx, ebx
je case.default.0x5126e8
push ebx
lea eax, [ebp - 0x828]
mov ecx, edi
push eax
call fcn.00511430
mov dword [ebp - 4], 0xe
cmp dword [ebp - 0x814], 8
mov eax, dword [ebp - 0x828]
jae 0x512baf
lea eax, [ebp - 0x828]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x512be3
cmp dword [ebp - 0x814], 8
mov eax, dword [ebp - 0x828]
jae 0x512bcf
lea eax, [ebp - 0x828]
push 1
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x828]
call fcn.004038c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052c233
mov esp, ebp
pop ebp
ret 4