Function at 0x4c6600
Capabilities:
Get common file path

Disassembly:
sub esp, 0x264
push ebx
mov ebx, dword [esp + 0x274]
push ebp
push esi
push edi
mov edi, dword [esp + 0x27c]
xor esi, esi
cmp edi, esi
je 0x4c662a
cmp ebx, esi
jle 0x4c662a
mov byte [edi + ebx - 1], 0
mov byte [edi], 0
push 0x44
call fcn.00467824
add esp, 4
cmp eax, esi
je 0x4c6647
mov ecx, eax
call fcn.004c7290
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x4c6677
cmp edi, esi
je 0x4c6667
cmp ebx, esi
jle 0x4c6667
mov eax, dword [0x4fec1c]
push 0x7f
push eax
dec ebx
push str._FILE__s__LINE__d:
push ebx
push edi
call fcn.00466ca7
add esp, 0x14
mov eax, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
mov cl, byte [esp + 0x13]
mov edi, dword [0x4d7360]
sub esp, 0x10
xor eax, eax
mov ebp, esp
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esp
mov byte [ebp], cl
or ecx, 0xffffffff
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
call fcn.004054d0
cmp eax, ebx
jae 0x4c66b6
call fcn.00463c83
mov ecx, dword [ebp + 4]
cmp ecx, esi
je 0x4c66db
mov al, byte [ecx - 1]
test al, al
je 0x4c66db
cmp al, 0xff
je 0x4c66db
cmp ebx, esi
jne 0x4c66ff
dec al
push esi
mov byte [ecx - 1], al
mov ecx, ebp
call fcn.00403b70
jmp 0x4c6728
cmp ebx, esi
jne 0x4c66ea
push 1
mov ecx, ebp
call fcn.00403b70
jmp 0x4c6728
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x4c66f6
cmp eax, ebx
jae 0x4c6707
push 1
mov ecx, ebp
call fcn.00403b70
push ebx
mov ecx, ebp
call fcn.004054e0
mov esi, dword [esp + 0x2c]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov ecx, dword [esp + 0x24]
call fcn.004c7140
mov cl, byte [esp + 0x13]
mov esi, dword [0x4d7360]
sub esp, 0x10
xor eax, eax
mov ebp, esp
mov edi, esi
mov dword [esp + 0x30], esp
mov byte [ebp], cl
or ecx, 0xffffffff
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
call fcn.004054d0
cmp eax, ebx
jae 0x4c676e
call fcn.00463c83
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x4c6793
mov al, byte [ecx - 1]
test al, al
je 0x4c6793
cmp al, 0xff
je 0x4c6793
test ebx, ebx
jne 0x4c67b7
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
call fcn.00403b70
jmp 0x4c67dc
test ebx, ebx
jne 0x4c67a2
push 1
mov ecx, ebp
call fcn.00403b70
jmp 0x4c67dc
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x4c67ae
cmp eax, ebx
jae 0x4c67bf
push 1
mov ecx, ebp
call fcn.00403b70
push ebx
mov ecx, ebp
call fcn.004054e0
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov esi, dword [esp + 0x24]
mov ecx, esi
call fcn.004c6ff0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, 0x2bf20
jbe 0x4c6843
mov ecx, dword [esp + 0x278]
push esi
call fcn.00481480
mov eax, dword [esp + 0x27c]
test eax, eax
je 0x4c6833
mov ecx, dword [esp + 0x280]
test ecx, ecx
jle 0x4c6833
mov edx, dword [0x4fec1c]
push 0x8c
push edx
dec ecx
push 0x4f40ac
push ecx
push eax
call fcn.00466ca7
add esp, 0x14
mov eax, 0x5b4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
lea eax, [esp + 0x170]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x4c68a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x278]
push esi
mov edi, eax
call fcn.00481480
mov eax, dword [esp + 0x27c]
test eax, eax
je 0x4c689c
mov ecx, dword [esp + 0x280]
test ecx, ecx
jle 0x4c689c
push ecx
mov ecx, dword [0x4fec1c]
push eax
push edi
push 0x98
push ecx
call fcn.004752f0
add esp, 0x14
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
mov edx, dword [str.h2000com.dll]
lea eax, [esp + 0x170]
push edx
push eax
push 0x4df9ac
lea ecx, [esp + 0x17c]
push 0x103
push ecx
call fcn.00466ca7
add esp, 0x14
lea edx, [esp + 0x170]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
mov dword [esp + 0x28], esi
jne 0x4c692e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x278]
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
call fcn.00481480
mov eax, dword [esp + 0x27c]
test eax, eax
je 0x4c6dd2
mov ecx, dword [esp + 0x280]
test ecx, ecx
jle 0x4c6dd2
push ecx
push eax
push esi
push 0xa7
jmp 0x4c6dc3
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.initcom
push esi
call edi
mov ebx, eax
test ebx, ebx
je 0x4c6d85
push str.readrec
push esi
call edi
test eax, eax
mov dword [esp + 0x20], eax
je 0x4c6d85
push str.initAC
push esi
call edi
test eax, eax
mov dword [esp + 0x24], eax
je 0x4c6d85
push str.closecom
push esi
call edi
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x1c], ebp
je 0x4c6d85
lea edx, [esp + 0x3c]
lea eax, [esp + 0x48]
push edx
lea ecx, [esp + 0x44]
push eax
lea edx, [esp + 0x4c]
push ecx
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x40]
push eax
lea edx, [esp + 0x48]
push ecx
lea eax, [esp + 0x44]
xor edi, edi
push edx
push eax
push edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x5c], edi
call ebx
mov ecx, dword [esp + 0x2c]
mov eax, 1
cmp ecx, eax
jne 0x4c69d2
mov ebx, eax
jmp 0x4c69fb
cmp dword [esp + 0x34], eax
jne 0x4c69df
mov ebx, 2
jmp 0x4c69fb
cmp dword [esp + 0x30], eax
jne 0x4c69ec
mov ebx, 3
jmp 0x4c69fb
cmp dword [esp + 0x38], eax
jne 0x4c6d2b
mov ebx, 4
xor ecx, ecx
lea edx, [esp + 0x150]
mov dword [esp + 0x4c], ecx
push ebx
mov dword [esp + 0x54], ecx
lea eax, [esp + 0x50]
mov dword [esp + 0x58], ecx
push edx
mov dword [esp + 0x60], ecx
push eax
mov byte [esp + 0x68], cl
lea ecx, [esp + 0x16c]
lea edx, [esp + 0x1f]
push ecx
lea eax, [esp + 0x22]
push edx
push eax
mov dword [esp + 0x30], ebx
call dword [esp + 0x3c]
cmp al, 0x31
mov byte [esp + 0x24], al
je 0x4c6aa2
push ebx
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x27c]
call fcn.00481480
mov eax, dword [esp + 0x27c]
test eax, eax
je 0x4c6a8e
mov ecx, dword [esp + 0x280]
test ecx, ecx
jle 0x4c6a8e
mov edx, dword [0x4fec1c]
push 0xe5
push edx
dec ecx
push 0x4f4060
push ecx
push eax
call fcn.00466ca7
add esp, 0x14
mov eax, dword [esp + 0x24]
and eax, 0xff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4c6b91
xor ecx, ecx
mov al, byte [esp + ecx + 0x4c]
cmp al, 0x39
jg 0x4c6acc
cmp al, 0x30
jl 0x4c6acc
inc ecx
cmp ecx, 0x10
jb 0x4c6ab8
jmp 0x4c6ad1
mov byte [esp + ecx + 0x4c], 0
mov al, byte [esp + 0x12]
sub esp, 0x10
mov ebp, esp
lea edi, [esp + 0x5c]
or ecx, 0xffffffff
mov dword [esp + 0x34], esp
mov byte [ebp], al
xor eax, eax
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
call fcn.004054d0
cmp eax, ebx
jae 0x4c6b0a
call fcn.00463c83
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x4c6b2f
mov al, byte [ecx - 1]
test al, al
je 0x4c6b2f
cmp al, 0xff
je 0x4c6b2f
test ebx, ebx
jne 0x4c6b53
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
call fcn.00403b70
jmp 0x4c6b80
test ebx, ebx
jne 0x4c6b3e
push 1
mov ecx, ebp
call fcn.00403b70
jmp 0x4c6b80
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x4c6b4a
cmp eax, ebx
jae 0x4c6b5b
push 1
mov ecx, ebp
call fcn.00403b70
push ebx
mov ecx, ebp
call fcn.004054e0
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov esi, dword [esp + 0x38]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov ecx, dword [esp + 0x24]
call fcn.004c6ff0
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
xor ecx, ecx
lea edx, [esp + 0x4c]
mov dword [esp + 0x4c], ecx
push ebx
mov dword [esp + 0x54], ecx
push edx
mov dword [esp + 0x5c], ecx
push 0x12
mov dword [esp + 0x64], ecx
push 1
push 1
mov word [esp + 0x70], cx
call dword [esp + 0x34]
cmp al, 0x31
je 0x4c6c19
push ebx
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x27c]
test eax, eax
je 0x4c6bf8
mov ecx, dword [esp + 0x280]
test ecx, ecx
jle 0x4c6bf8
mov edx, dword [0x4fec1c]
push 0xfe
push edx
dec ecx
push 0x4f4038
push ecx
push eax
call fcn.00466ca7
add esp, 0x14
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x278]
push eax
call fcn.00481480
mov eax, 0x31
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4c6d03
lea ecx, [esp + 0x4e]
push 0x10
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.00467840
mov al, byte [esp + 0x1e]
push ecx
mov ebp, esp
mov byte [esp + 0x6c], 0
xor esi, esi
lea edi, [esp + 0x5c]
mov byte [ebp], al
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x30], esp
mov ebx, ecx
mov ecx, ebp
call fcn.004054d0
cmp eax, ebx
jae 0x4c6c7c
call fcn.00463c83
mov ecx, dword [ebp + 4]
cmp ecx, esi
je 0x4c6ca1
mov al, byte [ecx - 1]
test al, al
je 0x4c6ca1
cmp al, 0xff
je 0x4c6ca1
cmp ebx, esi
jne 0x4c6cc5
dec al
push esi
mov byte [ecx - 1], al
mov ecx, ebp
call fcn.00403b70
jmp 0x4c6cee
cmp ebx, esi
jne 0x4c6cb0
push 1
mov ecx, ebp
call fcn.00403b70
jmp 0x4c6cee
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x4c6cbc
cmp eax, ebx
jae 0x4c6ccd
push 1
mov ecx, ebp
call fcn.00403b70
push ebx
mov ecx, ebp
call fcn.004054e0
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ebx + eax], 0
mov ecx, dword [esp + 0x24]
call fcn.004c7140
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
push ebx
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x27c]
call fcn.00481480
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x278]
push edx
call fcn.00481480
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x27c]
cmp eax, edi
je 0x4c6d75
mov ecx, dword [esp + 0x280]
cmp ecx, edi
jle 0x4c6d75
mov edx, dword [0x4fec1c]
push 0xd3
push edx
dec ecx
push 0x4f4010
push ecx
push eax
call fcn.00466ca7
add esp, 0x14
mov eax, 0x15
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x278]
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
call fcn.00481480
mov eax, dword [esp + 0x27c]
test eax, eax
je 0x4c6dd2
mov ecx, dword [esp + 0x280]
test ecx, ecx
jle 0x4c6dd2
push ecx
push eax
push esi
push 0xb6
mov ecx, dword [0x4fec1c]
push ecx
call fcn.004752f0
add esp, 0x14
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x264
ret