Function at 0x4649f4
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 3
add esp, 0xfffff004
push eax
dec eax
jne 0x4649fd
mov eax, dword [ebp - 4]
add esp, 0xfffffd80
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
test ebx, ebx
je 0x464a30
push ebx
call fcn.00497c90
pop ecx
cmp eax, 0x400
jae 0x464d0a
test esi, esi
je 0x464a46
mov eax, esi
call fcn.0041074c
cmp eax, 0x400
jge 0x464d0a
push 0
push 0
push 0
push 1
mov eax, 0x4c5b84
xor ecx, ecx
mov edx, ebx
call fcn.00457644
test al, al
jne 0x464a6a
cmp byte [ebp + 0x14], 0
jne 0x464d0a
push 1
push 0
mov eax, 0x4c5b84
mov ecx, esi
mov edx, ebx
call fcn.00455f70
mov edi, eax
cmp edi, 1
je 0x464aee
cmp dword [ebp + 8], 1
jne 0x464abb
test edi, edi
jne 0x464abb
push 0
push 1
push 0
push 0
mov eax, 0x4c5b84
xor ecx, ecx
mov edx, ebx
call fcn.00457644
test al, al
je 0x464abb
mov eax, 0x1fc
call fcn.004125b4
push eax
push ebx
call fcn.0047d1f0
add esp, 8
cmp dword [ebp + 8], 0
je 0x464d0a
inc edi
jne 0x464d0a
xor edx, edx
mov eax, ebx
call fcn.0040a710
test al, al
je 0x464d0a
mov eax, 0x4b1ad4
mov edx, ebx
call fcn.0042d584
jmp 0x464d0a
cmp byte [ebp + 0xc], 0
je 0x464b0e
lea edx, [ebp - 0xa0]
mov eax, 0x4c5b84
call fcn.0045759c
cmp byte [ebp - 0xa], 0
jne 0x464d0a
cmp byte [ebp + 0x10], 0
je 0x464b9c
mov eax, 0x4c5b84
call fcn.00457594
test eax, eax
je 0x464b9c
push 0
push 0
push 0
push 1
lea ecx, [ebp - 0x4a0]
mov eax, 0x4c5b84
mov edx, ebx
call fcn.00457644
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040f208
test eax, eax
je 0x464b66
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x464d0a
mov edx, 0x4a9f38
lea eax, [ebp - 0x4a0]
call fcn.0040c040
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040f208
test eax, eax
je 0x464b9c
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x464d0a
push 0xc30
push 0
lea eax, [ebp - 0x10d0]
push eax
call fcn.00497ae0
add esp, 0xc
lea edx, [ebp - 0x10d0]
mov eax, ebx
call fcn.0040abb0
call fcn.00410420
test eax, eax
je 0x464c06
test esi, esi
je 0x464bd2
cmp word [esi], 0
jne 0x464c06
lea edx, [ebp - 0x20d0]
push edx
push 0x800
call sub.KERNEL32.DLL_GetCurrentDirectoryW
lea eax, [ebp - 0x20d0]
call fcn.0040f3ec
test al, al
jne 0x464c06
lea esi, [ebp - 0x18d0]
mov ecx, 0x1000000
mov edx, esi
mov eax, ebx
call fcn.00410498
mov eax, esi
call fcn.0040f1b8
lea edx, [ebp - 0xcd0]
call fcn.0040abf8
mov ecx, dword [0x4c5d8c]
mov eax, 0x4c5b84
mov dword [ebp - 0x4a4], ecx
call fcn.00457594
test eax, eax
je 0x464c39
or dword [ebp - 0x4b4], 4
mov edi, dword [ebp - 4]
test edi, edi
jne 0x464c7c
lea eax, [ebp - 0x2570]
call fcn.00413d44
lea eax, [ebp - 0x2544]
call fcn.00413d44
lea eax, [ebp - 0x2518]
call fcn.00413d44
push 0
lea ecx, [ebp - 0x3184]
mov edx, esi
mov eax, ebx
call fcn.00412e5c
test al, al
je 0x464c7c
lea edi, [ebp - 0x3184]
test edi, edi
je 0x464cb0
mov eax, dword [edi + 0xc00]
mov dword [ebp - 0x4d0], eax
mov eax, dword [edi + 0xc04]
mov dword [ebp - 0x4cc], eax
mov edx, dword [edi + 0x10a8]
mov dword [ebp - 0x4bc], edx
mov edx, dword [edi + 0x10ac]
mov dword [ebp - 0x4b8], edx
inc dword [0x4c811c]
mov eax, dword [ebp - 0x4d0]
mov edx, dword [ebp - 0x4cc]
add dword [0x4c8128], eax
adc dword [0x4c812c], edx
lea edx, [ebp - 0x10d0]
mov eax, dword [ebp + 0x18]
call fcn.004607fc
mov ebx, eax
mov eax, 0x35c
inc ebx
push ebx
call fcn.004125b4
push eax
lea edx, [ebp - 0x3284]
push edx
call fcn.0049abc0
add esp, 0xc
lea edx, [ebp - 0x3284]
mov eax, 0x4c53a8
call fcn.0047c814
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14