Function at 0x51a0c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push ebp
lea eax, [esp + 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x108]
push ecx
call fcn.004dc020
mov ecx, dword [esp + 0x214]
xor ebp, ebp
add esp, 4
cmp ecx, ebp
jne 0x51a110
lea edx, [esp + 0x108]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor eax, eax
pop ebp
add esp, 0x208
ret
mov al, byte [ecx]
cmp al, 0x5c
push esi
mov dword [esp + 8], ebp
jne 0x51a120
cmp byte [ecx + 1], al
je 0x51a129
cmp al, 0x2f
jne 0x51a142
cmp byte [ecx + 1], al
jne 0x51a142
mov byte [edi], 0x5c
mov byte [edi + 1], 0
mov dword [esp + 8], 2
mov esi, 1
jmp 0x51a1c3
cmp al, 0x5c
je 0x51a21c
cmp al, 0x2f
je 0x51a21c
cmp byte [ecx + 1], 0x3a
jne 0x51a190
cmp al, 0x61
jl 0x51a168
cmp al, 0x7a
jg 0x51a168
movsx eax, al
sub eax, 0x20
jmp 0x51a16b
movsx eax, al
mov byte [edi], al
mov al, byte [ecx + 1]
mov byte [edi + 1], al
mov byte [edi + 2], 0
cmp byte [ecx + 2], 0x5c
mov esi, 2
mov dword [esp + 8], esi
jne 0x51a1c3
mov dword [esp + 8], 3
jmp 0x51a1c3
lea ecx, [esp + 0x10c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov al, byte [esi + edi - 1]
cmp al, 0x5c
je 0x51a1b4
cmp al, 0x2f
jne 0x51a1bc
mov byte [esi + edi - 1], 0
sub esi, 1
mov ecx, dword [esp + 0x214]
mov edx, dword [esp + 8]
mov al, byte [edx + ecx]
test al, al
push ebx
lea ebx, [edx + ecx]
je 0x51a352
cmp al, 0x2f
je 0x51a287
cmp al, 0x5c
je 0x51a287
mov eax, dword [0x71567c]
push eax
push ebx
call fcn.0050a300
add esp, 8
test eax, eax
jne 0x51a256
mov bl, byte [ebx]
cmp bl, 0x61
jl 0x51a242
cmp bl, 0x7a
jg 0x51a242
movsx eax, bl
sub eax, 0x20
mov byte [esp + ebp + 0x10], al
mov byte [esp + ebp + 0x11], 0
add ebp, 1
jmp 0x51a31c
mov dl, byte [esp + 0x10c]
mov al, byte [esp + 0x10d]
mov byte [edi], dl
mov byte [edi + 1], al
mov byte [edi + 2], 0
mov dword [esp + 8], 1
mov esi, 2
jmp 0x51a1c3
movsx eax, bl
mov byte [esp + ebp + 0x10], al
mov byte [esp + ebp + 0x11], 0
add ebp, 1
jmp 0x51a31c
movzx ecx, byte [ebx]
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x218]
mov byte [esp + ebp + 0x10], cl
movzx ecx, byte [eax + edx + 1]
mov byte [esp + ebp + 0x11], cl
mov byte [esp + ebp + 0x12], 0
add ebp, 2
add eax, 2
mov dword [esp + 0xc], eax
mov ecx, edx
jmp 0x51a328
test ebp, ebp
je 0x51a323
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push 0x69f2dc
lea edx, [esp + 0x14]
push edx
call ebx
test eax, eax
je 0x51a31a
push 0x69e694
lea eax, [esp + 0x14]
push eax
call ebx
test eax, eax
jne 0x51a302
sub esi, 1
cmp byte [esi + edi], 0x5c
je 0x51a2f1
mov edi, edi
mov al, byte [esi + edi]
cmp al, 0x2f
je 0x51a2f1
cmp al, 0x3a
je 0x51a2f1
mov ecx, dword [0x71567c]
push ecx
lea edx, [esi - 1]
push edx
push edi
call fcn.0050a380
sub eax, 2
add esp, 0xc
neg eax
sbb eax, eax
add eax, 2
sub esi, eax
cmp byte [esi + edi], 0x5c
jne 0x51a2c0
cmp byte [esi + edi], 0x3a
je 0x51a2fd
mov byte [esi + edi], 0
jmp 0x51a31a
add esi, 1
jmp 0x51a31a
mov byte [esi + edi], 0x5c
lea eax, [esp + 0x10]
add esi, 1
push eax
lea ecx, [esi + edi]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esi, ebp
xor ebp, ebp
mov ecx, dword [esp + 0x218]
add dword [esp + 0xc], 1
mov edx, dword [esp + 0xc]
mov al, byte [edx + ecx]
test al, al
lea ebx, [edx + ecx]
jne 0x51a1d6
test ebp, ebp
je 0x51a352
lea eax, [esp + 0x10]
push eax
lea ecx, [esi + edi + 1]
push ecx
mov byte [esi + edi], 0x5c
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x208
ret