Function at 0x6861f200
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, 0x2e
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 8]
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [ebp - 0x2c], eax
call sym._strrchr
test eax, eax
mov ebx, eax
je 0x6861f23f
mov esi, 0x5c
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._strchr
test eax, eax
je 0x6861f4f0
mov edx, dword [ebp - 0x2c]
mov edi, str..exe_.cmd_.bat_.com
mov dword [esp], edx
call sym._strlen
mov dword [esp], str.PATHEXT
mov dword [ebp - 0x20], eax
call sym.libglib_2.0_0.dll_g_getenv_utf8
xor edx, edx
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], 0x6869947e
mov dword [esp + 8], eax
call sym.libglib_2.0_0.dll_g_build_path
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
movzx eax, byte [ecx]
test al, al
je 0x6861f3a1
lea esi, [esi]
cmp al, 0x3b
je 0x6861f44b
mov ebx, ecx
jmp 0x6861f2a4
cmp al, 0x3b
je 0x6861f2ac
inc ebx
movzx eax, byte [ebx]
test al, al
jne 0x6861f2a0
mov esi, dword [ebp - 0x1c]
mov eax, ebx
mov dword [ebp - 0x4c], ebx
sub eax, esi
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x20]
add eax, ebx
mov dword [ebp - 0x24], eax
inc eax
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_malloc
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x2c]
cmp ebx, 8
mov edx, eax
mov dword [ebp - 0x3c], eax
jae 0x6861f3f0
xor ecx, ecx
test bl, 4
je 0x6861f2f1
mov ecx, dword [esi]
mov eax, dword [ebp - 0x3c]
mov dword [eax], ecx
mov ecx, 4
test bl, 2
je 0x6861f304
movzx eax, word [esi + ecx]
mov edi, dword [ebp - 0x3c]
mov word [edi + ecx], ax
add ecx, 2
test bl, 1
je 0x6861f313
movzx eax, byte [esi + ecx]
mov ebx, dword [ebp - 0x3c]
mov byte [ebx + ecx], al
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
cmp eax, 8
lea edi, [edx + edi]
mov dword [ebp - 0x28], edi
jae 0x6861f3b5
xor ecx, ecx
test al, 4
je 0x6861f33d
mov ecx, dword [esi]
mov ebx, dword [ebp - 0x28]
mov dword [ebx], ecx
mov ecx, 4
test al, 2
je 0x6861f34f
movzx ebx, word [esi + ecx]
mov edi, dword [ebp - 0x28]
mov word [edi + ecx], bx
add ecx, 2
test al, 1
je 0x6861f35d
movzx eax, byte [esi + ecx]
mov esi, dword [ebp - 0x28]
mov byte [esi + ecx], al
mov edi, dword [ebp - 0x24]
mov eax, edx
mov byte [edx + edi], 0
mov dword [ebp - 0x34], edx
call sym._inner_find_program_in_path
mov edx, dword [ebp - 0x34]
mov dword [esp], edx
mov esi, eax
call sym.libglib_2.0_0.dll_g_free
test esi, esi
jne 0x6861f436
mov edx, dword [ebp - 0x4c]
cmp byte [edx], 0
je 0x6861f421
inc edx
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ecx]
test al, al
jne 0x6861f290
mov ebx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x4c], ebx
jmp 0x6861f2b9
test edi, 1
jne 0x6861f496
test byte [ebp - 0x28], 2
jne 0x6861f45f
test byte [ebp - 0x28], 4
jne 0x6861f47e
mov ecx, eax
mov edi, dword [ebp - 0x28]
and eax, 3
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x28], edi
jmp 0x6861f32b
test al, 1
jne 0x6861f4d8
test byte [ebp - 0x3c], 2
jne 0x6861f4be
test byte [ebp - 0x3c], 4
jne 0x6861f4a6
mov ecx, ebx
mov edi, dword [ebp - 0x3c]
and ebx, 3
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x3c], edi
jmp 0x6861f2de
mov ecx, dword [ebp - 0x30]
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_free
add esp, 0x5c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_free
add esp, 0x5c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x4c], esi
jmp 0x6861f2b9
movzx ecx, word [esi]
sub eax, 2
add esi, 2
mov ebx, dword [ebp - 0x28]
mov word [ebx], cx
add ebx, 2
mov dword [ebp - 0x28], ebx
test byte [ebp - 0x28], 4
je 0x6861f3d5
mov ecx, dword [esi]
sub eax, 4
add esi, 4
mov edi, dword [ebp - 0x28]
mov dword [edi], ecx
add edi, 4
mov dword [ebp - 0x28], edi
jmp 0x6861f3d5
movzx ecx, byte [esi]
dec eax
inc esi
mov byte [edi], cl
inc edi
mov dword [ebp - 0x28], edi
jmp 0x6861f3c1
mov ecx, dword [esi]
sub ebx, 4
add esi, 4
mov edi, dword [ebp - 0x3c]
mov dword [edi], ecx
add edi, 4
mov dword [ebp - 0x3c], edi
jmp 0x6861f40c
movzx ecx, word [esi]
sub ebx, 2
add esi, 2
mov eax, dword [ebp - 0x3c]
mov word [eax], cx
add eax, 2
mov dword [ebp - 0x3c], eax
jmp 0x6861f402
movzx eax, byte [esi]
lea edi, [edx + 1]
mov byte [edx], al
mov esi, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x3c], edi
inc esi
dec ebx
jmp 0x6861f3f8
mov ecx, 0x2f
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sym._strchr
test eax, eax
jne 0x6861f23f
mov eax, dword [ebp - 0x2c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
jmp sym._inner_find_program_in_path