Function at 0x48c3e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x10], 0
cmp dword [edi], 3
jne 0x48c429
test byte [ebx + 0x128], 1
jne 0x48c429
mov edx, str.SCRATCH
mov ecx, 7
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
jmp 0x48c6f1
mov ecx, dword [ebx + 0xbc]
lea eax, [ecx + 4]
cmp eax, 3
ja case.default.0x48c440
mov edx, 0x400000
jmp dword [eax*4 + 0x48c9f0]
mov eax, dword [ebx + 0x130]
test ah, 2
je 0x48c45a
test dword [ebx + 0x128], edx
je case.0x48c440.3
push str.FOR_READ
call fcn.0049f0ae
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebp - 4], edx
jne 0x48c4fd
push 0xfffffffffffffff6
call esi
mov dword [ebx + 0xa8], eax
mov edx, dword [0x4bf0c8]
jmp 0x48c4f3
mov eax, dword [ebx + 0x130]
test ah, 2
je 0x48c499
test dword [ebx + 0x128], edx
je case.0x48c440.2
push str.FOR_ACCEPT
jmp 0x48c45f
mov eax, dword [ebx + 0x130]
test ah, 2
je 0x48c4b3
test dword [ebx + 0x128], edx
je case.0x48c440.1
push str.FOR_TYPE
jmp 0x48c4d2
mov eax, dword [ebx + 0x130]
test ah, 2
je 0x48c4cd
test dword [ebx + 0x128], edx
je case.default.0x48c440
push str.FOR_PRINT
call fcn.0049f0ae
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebp - 4], edx
jne 0x48c4fd
push 0xfffffffffffffff5
call esi
mov dword [ebx + 0xa8], eax
mov edx, dword [0x4bf0cc]
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], 0
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x48c682
mov eax, dword [edi + 4]
test eax, eax
je 0x48c562
mov ecx, dword [edi + 8]
cmp ecx, 0x100
jle 0x48c525
mov ecx, 0x100
mov dword [ebp - 8], ecx
mov esi, eax
mov eax, ecx
lea edx, [ebp - 0x118]
lea edi, [ebp - 0x118]
mov dword [ebp - 4], edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov byte [edx + ecx], 0
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
jmp 0x48c685
push ecx
lea eax, [ebp - 0x118]
push str.FORT_d
push eax
call fcn.0049f05c
lea ecx, [ebp - 0x118]
push ecx
call fcn.0049f0ae
mov edx, eax
xor edi, edi
add esp, 0x10
cmp edx, edi
mov dword [ebp - 4], edx
je 0x48c59f
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x48c682
mov eax, dword [ebx + 0xbc]
add eax, 4
cmp eax, 0xa
ja case.default.0x48c5b5
xor edx, edx
mov dl, byte [eax + 0x48ca10]
jmp dword [edx*4 + 0x48ca00]
push 0xfffffffffffffff4
jmp 0x48c5d4
push 0xfffffffffffffff6
call esi
mov dword [ebx + 0xa8], eax
mov edx, dword [0x4bf0c8]
jmp 0x48c5e2
push 0xfffffffffffffff5
call esi
mov dword [ebx + 0xa8], eax
mov edx, dword [0x4bf0cc]
cmp edx, edi
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], edi
je case.default.0x48c5b5
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x48c682
mov eax, dword [ebx + 0x130]
test ah, 2
jne 0x48c670
test byte [ebx + 0x128], 1
je 0x48c637
mov edx, dword [ebx + 0x50]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
mov dword [ebp - 4], edx
repne scasb al, byte es:[edi]
mov eax, dword [ebp + 0xc]
not ecx
mov edi, dword [eax]
dec ecx
test edi, edi
mov dword [ebp - 8], ecx
je 0x48c685
mov dword [eax], 0
jmp 0x48c685
mov ecx, dword [ebx + 0xbc]
lea edx, [ebp - 0x118]
push ecx
push str.fort._d
push edx
call fcn.0049f05c
lea edi, [ebp - 0x118]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [ebp - 0x118]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
jmp 0x48c685
lea edx, [ebp - 0x118]
mov byte [ebp - 0x118], 0
mov dword [ebp - 4], edx
xor ecx, ecx
mov dword [ebp - 8], ecx
cmp byte [edx], 0x20
jne 0x48c69b
test ecx, ecx
jle 0x48c6bb
inc edx
dec ecx
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
cmp byte [edx], 0x20
je 0x48c68a
test ecx, ecx
jle 0x48c6bb
mov al, byte [edx + ecx - 1]
cmp al, 0x20
je 0x48c6ab
test al, al
jne 0x48c6b3
dec ecx
test ecx, ecx
mov dword [ebp - 8], ecx
jg 0x48c69f
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
test ecx, ecx
jne 0x48c6e7
mov eax, dword [ebx + 0x130]
test ah, 2
je 0x48c6e7
lea eax, [ebp - 8]
lea ecx, [ebp - 4]
push eax
push ecx
push ebx
call fcn.0048cf50
add esp, 0xc
test eax, eax
jne 0x48c9e8
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x48c733
mov edi, dword [ebp + 0xc]
mov byte [ecx + edx], 0
mov edx, dword [ebp - 4]
push edx
push ebx
call fcn.00472700
add esp, 8
cmp eax, 0xffffffff
je 0x48c7a8
mov ecx, dword [0x3f5a180]
mov dword [ebp - 0xc], 0
test ecx, ecx
jne 0x48c721
cmp eax, 0xfffffffa
je 0x48c726
cmp eax, 1
jne 0x48c78e
push 0xfffffffffffffff5
call esi
mov dword [ebx + 0xa8], eax
mov edx, dword [ebp - 4]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [ebp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x3f5a180]
test eax, eax
mov eax, dword [ebp - 0xc]
je 0x48c9a9
test eax, eax
jne 0x48c9c8
cmp dword [ebx + 0xa8], 0xffffffff
jne 0x48c9c8
mov ecx, dword [ebp - 0x10]
test ecx, ecx
jne 0x48c9ad
mov dword [ebx + 0xa8], eax
jmp 0x48c9ad
test eax, eax
jne 0x48c796
push 0xfffffffffffffff6
jmp 0x48c728
cmp eax, 2
jne 0x48c79f
push 0xfffffffffffffff4
jmp 0x48c728
mov dword [ebp - 0x10], 1
jmp 0x48c730
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x48c730
mov eax, dword [ebx + 0x130]
test ah, 4
je 0x48c7d7
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x48c7d7
cmp dword [edi], 3
jne 0x48c730
test byte [ebx + 0x128], 1
jne 0x48c730
mov edx, dword [edi + 0xc]
test edx, edx
jne 0x48c81a
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x21c]
push eax
push ecx
push 0x101
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x48c80f
cmp eax, 0x101
jae 0x48c80f
lea ecx, [ebp - 0x21c]
mov dword [ebp - 8], eax
mov dword [ebp - 4], ecx
xor esi, esi
xor eax, eax
xor edx, edx
jmp 0x48c8a5
mov eax, dword [edi + 0x10]
lea ecx, [eax + 1]
cmp ecx, 0x100
jle 0x48c834
pop edi
pop esi
mov eax, 0xc000002b
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, eax
mov esi, edx
mov edx, ecx
lea edi, [ebp - 0x21c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x21c]
mov byte [ebp + eax - 0x21c], 0
test ecx, ecx
lea esi, [ebp - 0x21c]
je 0x48c891
cmp byte [ebp - 0x21c], 0x20
jne 0x48c87b
test eax, eax
jle 0x48c891
mov cl, byte [esi + 1]
inc esi
dec eax
cmp cl, 0x20
je 0x48c86d
test eax, eax
jle 0x48c891
mov cl, byte [esi + eax - 1]
cmp cl, 0x20
je 0x48c88c
test cl, cl
jne 0x48c891
dec eax
test eax, eax
jg 0x48c87f
cmp eax, 1
jge 0x48c89a
xor edx, edx
jmp 0x48c8a5
mov cl, byte [eax + esi]
xor edx, edx
cmp cl, 0x5c
setne dl
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], 3
jne 0x48c939
test byte [ebx + 0x128], 1
jne 0x48c939
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x48c8c5
mov eax, esi
jmp 0x48c904
mov eax, dword [ebx + 0x130]
test ah, 4
je 0x48c8e6
mov byte [ebp - 0x320], 0x2e
mov byte [ebp - 0x31f], 0
lea eax, [ebp - 0x320]
jmp 0x48c904
lea edx, [ebp - 0x320]
push edx
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x320]
and eax, ecx
lea edx, [ebp - 0x424]
push edx
push 0
push 0x4bf1ac
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov eax, dword [ebx + 0x130]
lea edi, [ebp - 0x422]
test ah, 4
jne 0x48c735
lea edi, [ebp - 0x424]
jmp 0x48c735
mov ecx, dword [ebp - 8]
add ecx, eax
add ecx, edx
cmp ecx, 0x100
jle 0x48c954
pop edi
pop esi
mov eax, 0xc000002b
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x10]
mov ecx, eax
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
test edx, edx
rep movsb byte es:[edi], byte [esi]
je 0x48c977
mov esi, dword [ebp + 0x10]
mov cl, byte [0x4bf1a8]
mov byte [eax + esi], cl
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 4]
lea edi, [eax + edx]
add edi, ebx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [ebp + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 8]
add eax, ecx
add eax, edx
mov edx, dword [ebp + 0x10]
mov byte [eax + edx], 0
jmp 0x48c753
test eax, eax
jne 0x48c9c8
cmp dword [ebx + 0xa8], 0xffffffff
jne 0x48c9c8
mov ecx, dword [ebp + 0x14]
pop edi
pop esi
xor eax, eax
mov dword [ecx], 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x48c9e1
mov edx, dword [ebp + 0x14]
pop edi
pop esi
xor eax, eax
mov dword [edx], 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret