Function at 0x6861ec20
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x66c
test eax, eax
je 0x6861f136
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_path_is_absolute
test eax, eax
jne 0x6861ec6c
mov ecx, 0x5c
mov dword [esp + 4], ecx
mov dword [esp], esi
call sym._strchr
test eax, eax
jne 0x6861ec6c
mov edx, 0x2f
mov dword [esp + 4], edx
mov dword [esp], esi
call sym._strchr
test eax, eax
je 0x6861ec91
mov eax, 8
xor ebx, ebx
mov dword [esp + 4], eax
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_file_test_utf8
test eax, eax
jne 0x6861f196
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.PATH
mov ebx, 0x103
call sym.libglib_2.0_0.dll_g_getenv_utf8
lea edi, [ebp - 0x21e]
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], edi
mov dword [esp], 0
mov dword [ebp - 0x644], eax
call sym._GetModuleFileNameW_12
dec eax
sub esp, 0xc
cmp eax, 0x101
jbe 0x6861f10c
mov ecx, 0x103
lea edi, [ebp - 0x424]
mov dword [esp + 4], ecx
mov dword [esp], edi
call sym._GetSystemDirectoryW_8
xor edx, edx
mov dword [ebp - 0x640], edx
dec eax
sub esp, 8
cmp eax, 0x101
jbe 0x6861f0de
lea edx, [ebp - 0x62a]
mov edi, 0x103
mov dword [esp + 4], edi
xor edi, edi
mov dword [esp], edx
mov dword [ebp - 0x64c], edx
call sym._GetWindowsDirectoryW_8
mov edx, dword [ebp - 0x64c]
dec eax
sub esp, 8
cmp eax, 0x101
jbe 0x6861f0b4
xor edx, edx
test ebx, ebx
mov dword [ebp - 0x63c], edx
je 0x6861ed57
mov dword [esp], ebx
call sym.libglib_2.0_0.dll_g_path_get_dirname
mov dword [esp], ebx
mov dword [ebp - 0x63c], eax
call sym.libglib_2.0_0.dll_g_free
mov eax, dword [ebp - 0x644]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_strdup
test edi, edi
mov ebx, eax
je 0x6861eda4
mov ecx, 0x6869947e
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [ebp - 0x64c], ebx
mov dword [esp + 0xc], eax
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_strconcat
mov edx, dword [ebp - 0x64c]
mov dword [esp], edx
mov ebx, eax
call sym.libglib_2.0_0.dll_g_free
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_free
mov edx, dword [ebp - 0x640]
mov edi, ebx
test edx, edx
je 0x6861ede9
mov ecx, dword [ebp - 0x640]
xor eax, eax
mov edi, 0x6869947e
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_strconcat
mov dword [esp], ebx
mov edi, eax
call sym.libglib_2.0_0.dll_g_free
mov eax, dword [ebp - 0x640]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_free
xor ecx, ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp], 0x68699480
call sym.libglib_2.0_0.dll_g_strconcat
mov dword [esp], edi
mov ebx, eax
call sym.libglib_2.0_0.dll_g_free
mov edx, dword [ebp - 0x63c]
mov dword [ebp - 0x644], ebx
test edx, edx
je 0x6861ee56
xor eax, eax
mov edi, 0x6869947e
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x63c]
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_strconcat
mov dword [esp], ebx
mov dword [ebp - 0x644], eax
call sym.libglib_2.0_0.dll_g_free
mov ecx, dword [ebp - 0x63c]
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_free
mov dword [esp], esi
call sym._strlen
mov ecx, dword [ebp - 0x644]
mov dword [esp], ecx
mov ebx, eax
lea eax, [eax + 1]
mov dword [ebp - 0x63c], eax
call sym._strlen
mov dword [ebp - 0x640], eax
mov edi, eax
mov eax, dword [ebp - 0x63c]
inc edi
lea eax, [edi + eax]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_malloc
mov edx, dword [ebp - 0x63c]
cmp edx, 8
mov dword [ebp - 0x648], eax
lea edi, [eax + edi]
jae 0x6861f081
xor eax, eax
test dl, 4
jne 0x6861f06d
test dl, 2
jne 0x6861f057
test dl, 1
jne 0x6861f04b
mov ebx, dword [ebp - 0x640]
mov eax, dword [ebp - 0x648]
add eax, ebx
mov dword [ebp - 0x640], eax
mov byte [eax], 0x5c
mov esi, dword [ebp - 0x644]
lea esi, [esi]
lea edi, [edi]
movzx edx, byte [esi]
test dl, dl
je 0x6861efa0
cmp dl, 0x3b
je 0x6861efa0
mov ebx, esi
jmp 0x6861ef14
cmp al, 0x3b
je 0x6861ef1c
inc ebx
movzx eax, byte [ebx]
test al, al
jne 0x6861ef10
cmp esi, ebx
je 0x6861efa0
mov ecx, dword [ebp - 0x640]
mov eax, esi
sub eax, ebx
add eax, ecx
mov dword [ebp - 0x63c], eax
mov eax, ebx
sub eax, esi
mov edi, dword [ebp - 0x63c]
cmp eax, 8
jae 0x6861eff0
xor edx, edx
test al, 4
je 0x6861ef58
mov edx, dword [esi]
mov dword [edi], edx
mov edx, 4
test al, 2
je 0x6861ef67
movzx ecx, word [esi + edx]
mov word [edi + edx], cx
add edx, 2
test al, 1
je 0x6861ef72
movzx eax, byte [esi + edx]
mov byte [edi + edx], al
mov edi, dword [ebp - 0x63c]
mov edx, 8
mov dword [esp + 4], edx
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_file_test_utf8
test eax, eax
jne 0x6861efb0
cmp byte [ebx], 0
je 0x6861f023
lea esi, [ebx + 1]
jmp 0x6861eef0
mov edi, dword [ebp - 0x640]
mov ebx, esi
inc edi
jmp 0x6861ef78
mov eax, 4
mov dword [esp + 4], eax
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_file_test_utf8
test eax, eax
jne 0x6861ef8d
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_strdup
mov ecx, dword [ebp - 0x648]
mov dword [esp], ecx
mov ebx, eax
call sym.libglib_2.0_0.dll_g_free
mov eax, dword [ebp - 0x644]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_free
jmp 0x6861ec87
test edi, 1
jne 0x6861f186
test edi, 2
jne 0x6861f160
test edi, 4
jne 0x6861f174
mov ecx, eax
and eax, 3
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x6861ef49
mov ecx, dword [ebp - 0x648]
xor ebx, ebx
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_free
mov eax, dword [ebp - 0x644]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_free
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, byte [esi + eax]
mov byte [edi + eax], dl
jmp 0x6861eec6
movzx ecx, word [esi + eax]
mov word [edi + eax], cx
add eax, 2
test dl, 1
je 0x6861eec6
jmp 0x6861f04b
mov eax, dword [esi]
test dl, 2
mov dword [edi], eax
mov eax, 4
je 0x6861eebd
jmp 0x6861f057
test edi, 1
jne 0x6861f1e4
test edi, 2
jne 0x6861f1d0
test edi, 4
jne 0x6861f1be
mov ecx, edx
and edx, 3
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x6861eea9
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x10], ecx
xor edi, edi
mov ecx, 0xffffffff
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call sym.libglib_2.0_0.dll_g_utf16_to_utf8
mov edi, eax
jmp 0x6861ed35
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], eax
xor edx, edx
mov eax, 0xffffffff
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_utf16_to_utf8
mov dword [ebp - 0x640], eax
jmp 0x6861ed01
xor ecx, ecx
xor edx, edx
xor eax, eax
mov ebx, 0xffffffff
mov dword [esp + 4], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_utf16_to_utf8
mov ebx, eax
jmp 0x6861ecd3
mov edi, str.program___NULL
mov esi, str.inner_find_program_in_path
mov dword [esp + 8], edi
xor ebx, ebx
mov dword [esp + 4], esi
mov dword [esp], 0x686993b9
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, word [esi]
sub eax, 2
add esi, 2
mov word [edi], dx
add edi, 2
jmp 0x6861f008
mov edx, dword [esi]
sub eax, 4
add esi, 4
mov dword [edi], edx
add edi, 4
jmp 0x6861f014
mov byte [edi], dl
inc esi
dec eax
mov edi, dword [ebp - 0x63c]
inc edi
jmp 0x6861effc
mov edi, 4
mov dword [esp + 4], edi
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_file_test_utf8
test eax, eax
jne 0x6861ec87
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_strdup
mov ebx, eax
jmp 0x6861ec87
mov eax, dword [esi]
sub edx, 4
add esi, 4
mov dword [edi], eax
add edi, 4
jmp 0x6861f0a5
movzx eax, word [esi]
sub edx, 2
add esi, 2
mov word [edi], ax
add edi, 2
jmp 0x6861f099
movzx eax, byte [esi]
mov edx, ebx
inc esi
mov byte [edi], al
inc edi
jmp 0x6861f08d