Function at 0x4c8d20
Capabilities:
Get common file path

Disassembly:
sub esp, 0x1f8
cmp dword [0x50f8c8], 0
push ebx
push esi
push edi
push ebp
je 0x4c8d43
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1f8
ret
lea eax, [esp + 0x118]
push 6
mov dword [0x50f8c8], 1
push 0x1aec
push 0x50
push eax
call fcn.004c8000
lea eax, [esp + 0x1c8]
add esp, 0x10
push 7
push 0x1aec
push 0x50
push eax
call fcn.004c8000
lea eax, [esp + 0x1c8]
lea ecx, [esp + 0x128]
lea edx, [esp + 0x178]
add esp, 0x10
push 0x5050cc
push eax
push ecx
push 0x50
push edx
call fcn.00479f10
lea ecx, [esp + 0x17c]
add esp, 0x14
push ecx
call dword [sym.imp.USER32.dll_CharUpperA]
cmp byte [esp + 0x168], 0x59
je 0x4c8de9
cmp byte [esp + 0x168], 0x54
je 0x4c8de9
cmp byte [esp + 0x168], 0x31
je 0x4c8de9
xor eax, eax
pop ebp
mov dword [0x50f8c8], 0
pop edi
pop esi
pop ebx
add esp, 0x1f8
ret
lea eax, [esp + 0x14]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esi, eax
test esi, esi
jle 0x4c8e3e
cmp dword [0x50928c], 0
jne 0x4c8e16
cmp esi, 1
jle 0x4c8e12
lea eax, [esi - 1]
jmp 0x4c8e2c
xor eax, eax
jmp 0x4c8e2c
lea eax, [esp + esi + 0x14]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USER32.dll_CharPrevA]
lea ecx, [esp + 0x14]
sub eax, ecx
cmp byte [esp + eax + 0x14], 0x5c
je 0x4c8e3e
mov byte [esp + esi + 0x14], 0x5c
mov byte [esp + esi + 0x15], 0
inc esi
push 1
mov eax, 0x104
push 0x30
sub eax, esi
lea ecx, [esp + esi + 0x1c]
push eax
push ecx
call fcn.004c8000
add esp, 0x10
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov word [esp + 0x12], ax
push 2
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, 0xffffffff
mov esi, eax
jne 0x4c8e90
lea eax, [esp + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
cmp eax, 0xffffffff
mov esi, eax
je 0x4c90af
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll__llseek]
mov edi, dword [esp + 0x20c]
push str.trace
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
cmp eax, 1
sbb ebp, ebp
neg ebp
test ebp, ebp
jne 0x4c8ede
lea eax, [esp + 0x14]
push edi
push str.__.20s:
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll__lwrite]
push eax
lea eax, [esp + 0x18]
push eax
push esi
call edi
jmp 0x4c8ee4
mov edi, dword [sym.imp.KERNEL32.dll__lwrite]
mov eax, dword [esp + 0x210]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
call ebx
mov ecx, dword [esp + 0x210]
push eax
push ecx
push esi
call edi
push 2
push 0x50655c
push esi
call edi
test ebp, ebp
jne 0x4c90a8
lea eax, [esp + 0x118]
push eax
call fcn.004f3450
lea eax, [esp + 0x1bc]
add esp, 4
push eax
call fcn.004f33c0
lea eax, [esp + 0x1bc]
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x18]
add esp, 4
push eax
push ecx
push str._s__s_r_n
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x24]
add esp, 0x10
push eax
push ecx
push esi
call edi
lea ecx, [esp + 0x14]
push 0x104
push ecx
mov edx, dword [0x50e328]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x14]
push eax
push ecx
push esi
call edi
lea ecx, [esp + 0x118]
push 1
push 0x50
push ecx
call fcn.004d7770
lea ecx, [esp + 0x124]
add esp, 0xc
push ecx
call ebx
lea ecx, [esp + 0x118]
lea edx, [esp + 0x14]
push ecx
push str.__s_r_n
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x20]
add esp, 0xc
push eax
push ecx
push esi
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_GetVersion]
call ebp
xor ecx, ecx
mov cl, ah
push ecx
xor ecx, ecx
mov cl, al
push ecx
push 0x16
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
mov eax, str.Debug
jne 0x4c8fe8
mov eax, 0x5050cc
push eax
push str._sWindows__d._d_r_n
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
push eax
lea eax, [esp + 0x18]
push eax
push esi
call edi
cmp word [0x50e1e8], 0
je 0x4c9057
cmp dword [0x50e1fa], 0
je 0x4c9057
lea eax, [esp + 0x14]
push 2
push 0x104
mov ecx, dword [0x50e1e0]
push eax
push ecx
call fcn.00470ec0
add esp, 0x10
push 8
push str.Course:
push esi
call edi
lea ecx, [esp + 0x14]
push ecx
call ebx
lea ecx, [esp + 0x14]
push eax
push ecx
push esi
call edi
push 2
push 0x50655c
push esi
call edi
cmp word [0x506ba4], 0
je 0x4c909e
lea eax, [esp + 0x14]
push 0x104
push eax
mov ecx, dword [0x50e1e0]
push ecx
call fcn.00470b30
add esp, 0xc
push 9
push str.Records:
push esi
call edi
lea ecx, [esp + 0x14]
push ecx
call ebx
lea ecx, [esp + 0x14]
push eax
push ecx
push esi
call edi
push 2
push 0x50655c
push esi
call edi
push 2
push 0x50655c
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [esp + 0x12]
and eax, 0xffff
push eax
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, 1
pop ebp
mov dword [0x50f8c8], 0
pop edi
pop esi
pop ebx
add esp, 0x1f8
ret