Function at 0x464a24
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 0x464a2d
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 0x464a60
push ebx
call fcn.00497cb0
pop ecx
cmp eax, 0x400
jae 0x464d3a
test esi, esi
je 0x464a76
mov eax, esi
call fcn.00410768
cmp eax, 0x400
jge 0x464d3a
push 0
push 0
push 0
push 1
mov eax, 0x4c5bc4
xor ecx, ecx
mov edx, ebx
call fcn.00457674
test al, al
jne 0x464a9a
cmp byte [ebp + 0x14], 0
jne 0x464d3a
push 1
push 0
mov eax, 0x4c5bc4
mov ecx, esi
mov edx, ebx
call fcn.00455fa0
mov edi, eax
cmp edi, 1
je 0x464b1e
cmp dword [ebp + 8], 1
jne 0x464aeb
test edi, edi
jne 0x464aeb
push 0
push 1
push 0
push 0
mov eax, 0x4c5bc4
xor ecx, ecx
mov edx, ebx
call fcn.00457674
test al, al
je 0x464aeb
mov eax, 0x1fc
call fcn.004125d0
push eax
push ebx
call fcn.0047d240
add esp, 8
cmp dword [ebp + 8], 0
je 0x464d3a
inc edi
jne 0x464d3a
xor edx, edx
mov eax, ebx
call fcn.0040a72c
test al, al
je 0x464d3a
mov eax, 0x4b1b14
mov edx, ebx
call fcn.0042d5b4
jmp 0x464d3a
cmp byte [ebp + 0xc], 0
je 0x464b3e
lea edx, [ebp - 0xa0]
mov eax, 0x4c5bc4
call fcn.004575cc
cmp byte [ebp - 0xa], 0
jne 0x464d3a
cmp byte [ebp + 0x10], 0
je 0x464bcc
mov eax, 0x4c5bc4
call fcn.004575c4
test eax, eax
je 0x464bcc
push 0
push 0
push 0
push 1
lea ecx, [ebp - 0x4a0]
mov eax, 0x4c5bc4
mov edx, ebx
call fcn.00457674
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040f224
test eax, eax
je 0x464b96
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x464d3a
mov edx, 0x4a9f78
lea eax, [ebp - 0x4a0]
call fcn.0040c05c
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040f224
test eax, eax
je 0x464bcc
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x464d3a
push 0xc30
push 0
lea eax, [ebp - 0x10d0]
push eax
call fcn.00497b00
add esp, 0xc
lea edx, [ebp - 0x10d0]
mov eax, ebx
call fcn.0040abcc
call fcn.0041043c
test eax, eax
je 0x464c36
test esi, esi
je 0x464c02
cmp word [esi], 0
jne 0x464c36
lea edx, [ebp - 0x20d0]
push edx
push 0x800
call sub.KERNEL32.DLL_GetCurrentDirectoryW
lea eax, [ebp - 0x20d0]
call fcn.0040f408
test al, al
jne 0x464c36
lea esi, [ebp - 0x18d0]
mov ecx, 0x1000000
mov edx, esi
mov eax, ebx
call fcn.004104b4
mov eax, esi
call fcn.0040f1d4
lea edx, [ebp - 0xcd0]
call fcn.0040ac14
mov ecx, dword [0x4c5dcc]
mov eax, 0x4c5bc4
mov dword [ebp - 0x4a4], ecx
call fcn.004575c4
test eax, eax
je 0x464c69
or dword [ebp - 0x4b4], 4
mov edi, dword [ebp - 4]
test edi, edi
jne 0x464cac
lea eax, [ebp - 0x2570]
call fcn.00413d60
lea eax, [ebp - 0x2544]
call fcn.00413d60
lea eax, [ebp - 0x2518]
call fcn.00413d60
push 0
lea ecx, [ebp - 0x3184]
mov edx, esi
mov eax, ebx
call fcn.00412e78
test al, al
je 0x464cac
lea edi, [ebp - 0x3184]
test edi, edi
je 0x464ce0
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 [0x4c815c]
mov eax, dword [ebp - 0x4d0]
mov edx, dword [ebp - 0x4cc]
add dword [0x4c8168], eax
adc dword [0x4c816c], edx
lea edx, [ebp - 0x10d0]
mov eax, dword [ebp + 0x18]
call fcn.0046082c
mov ebx, eax
mov eax, 0x35c
inc ebx
push ebx
call fcn.004125d0
push eax
lea edx, [ebp - 0x3284]
push edx
call fcn.0049abd0
add esp, 0xc
lea edx, [ebp - 0x3284]
mov eax, 0x4c53e8
call fcn.0047c864
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14