Function at 0x4b0560
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [0x53273c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x438], eax
lea eax, [ebp - 0x404]
mov edi, dword [ebx + 0x440]
mov dword [ebp - 0x440], eax
test edi, edi
je 0x4b05a1
cmp byte [edi], 0
jne 0x4b064a
mov al, byte [ebx + 0x28]
add ebx, 0x28
mov edi, str.ampl_lic
mov ecx, ebx
mov esi, ebx
test al, al
je 0x4b064a
inc ecx
cmp al, 0x2f
je 0x4b05c5
cmp al, 0x3a
je 0x4b05c5
cmp al, 0x5c
jne 0x4b05c7
mov esi, ecx
mov al, byte [ecx]
test al, al
jne 0x4b05b8
cmp esi, ebx
jbe 0x4b064a
mov eax, esi
sub eax, ebx
add eax, 0xa
cmp eax, 0x400
jbe 0x4b05f6
push eax
call fcn.004d2dc9
mov ecx, eax
add esp, 4
mov dword [ebp - 0x440], ecx
test ecx, ecx
je 0x4b064a
jmp 0x4b05fc
lea ecx, [ebp - 0x404]
cmp byte [ebx], 0x2e
jne 0x4b060f
mov al, byte [ebx + 1]
cmp al, 0x2f
je 0x4b060c
cmp al, 0x5c
jne 0x4b060f
add ebx, 2
sub esi, ebx
je 0x4b061e
push esi
push ebx
push ecx
call fcn.004cfba0
add esp, 0xc
mov edx, dword [ebp - 0x440]
mov ecx, str.ampl_lic
sub esi, ecx
add edx, esi
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4b0630
mov eax, dword [ebp - 0x440]
mov edi, eax
cmp byte [eax], 0
je 0x4b0668
cmp byte [edi + 1], 0x3a
jne 0x4b0668
mov al, byte [edi + 2]
cmp al, 0x2f
je 0x4b065b
cmp al, 0x5c
jne 0x4b0668
cmp byte [edi + 3], 0
je 0x4b0668
xor esi, esi
jmp 0x4b0710
mov ebx, dword [ebp - 0x438]
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
test esi, esi
je 0x4b0817
cmp byte [edi + 1], 0x3a
jne 0x4b0716
movsx ebx, byte [edi]
cmp ebx, 0x61
jl 0x4b069c
cmp ebx, 0x7a
jg 0x4b069c
sub ebx, 0x20
mov eax, dword [ebp - 0x438]
movsx eax, byte [eax]
cmp eax, 0x61
jl 0x4b06b2
cmp eax, 0x7a
jg 0x4b06b2
sub eax, 0x20
cmp ebx, eax
je 0x4b070d
mov byte [ebp - 0x43c], al
lea eax, [ebp - 0x43c]
push eax
mov word [ebp - 0x43b], 0x3a
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x4b06e1
push edi
push str.Could_not_get_directory_for___s_
jmp 0x4b081d
push dword [ebp - 0x438]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
mov byte [ebp - 0x43c], bl
lea eax, [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test esi, esi
je 0x4b0817
add edi, 2
mov ebx, dword [ebp - 0x438]
mov edx, edi
lea ecx, [edx + 1]
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x4b0720
sub edx, ecx
lea eax, [edx + 2]
add eax, esi
cmp eax, dword [ebp + 0x10]
ja 0x4b0817
test esi, esi
je 0x4b0740
mov byte [ebx + esi], 0x5c
inc esi
sub ebx, edi
mov ecx, edi
add ebx, esi
mov dword [ebp - 0x444], ebx
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx + ecx - 1], al
test al, al
jne 0x4b0750
mov ebx, dword [ebp - 0x438]
add esi, edx
cmp edx, 5
jb 0x4b0795
cmp byte [edx + edi - 4], 0x2e
jne 0x4b0795
mov al, byte [edx + edi - 3]
cmp al, 0x65
je 0x4b077d
cmp al, 0x45
jne 0x4b0795
mov al, byte [edx + edi - 2]
cmp al, 0x78
je 0x4b0789
cmp al, 0x58
jne 0x4b0795
mov al, byte [edx + edi - 1]
cmp al, 0x65
je 0x4b07b1
cmp al, 0x45
je 0x4b07b1
lea eax, [esi + 5]
cmp eax, dword [ebp + 0x10]
ja 0x4b0817
mov eax, dword [0x507e38]
mov dword [ebx + esi], eax
mov al, byte [0x507e3c]
mov byte [ebx + esi + 4], al
add esi, 4
lea eax, [ebp - 0x434]
mov byte [ebx + esi], 0
push eax
push ebx
call fcn.004d644b
add esp, 8
test eax, eax
je 0x4b07d1
push ebx
push str.cannot_find___s_
jmp 0x4b081d
mov eax, dword [ebp - 0x42e]
and eax, 0xc000
cmp eax, 0x8000
je 0x4b07eb
push ebx
push str.not_a_regular_file:___s_
jmp 0x4b081d
mov eax, dword [ebp - 0x440]
lea ecx, [ebp - 0x404]
cmp eax, ecx
je 0x4b0804
push eax
call fcn.004d2dae
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret
push edi
push str.Directory_name_too_long_for___s_
call fcn.004afb30
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret