Function at 0x46f2ac
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 0x46f2b5
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
push 0
push 0
push 0
mov eax, 0x4c219c
xor ecx, ecx
mov edx, ebx
call fcn.004624c4
test al, al
jne 0x46f2f4
cmp byte [ebp + 0x14], 0
jne 0x46f598
push 1
push 0
mov eax, 0x4c219c
mov ecx, esi
mov edx, ebx
call fcn.00460e08
mov edi, eax
cmp edi, 1
je 0x46f37e
cmp dword [ebp + 8], 1
jne 0x46f34b
test edi, edi
jne 0x46f34b
mov edx, 0x4a7e68
mov eax, ebx
call fcn.0040be78
test al, al
jne 0x46f337
mov edx, 0x4a7e6c
mov eax, ebx
call fcn.0040be78
test al, al
je 0x46f34b
mov eax, 0x1fc
call fcn.00411fe8
push eax
push ebx
call fcn.004487f8
add esp, 8
cmp dword [ebp + 8], 0
je 0x46f598
inc edi
jne 0x46f598
xor edx, edx
mov eax, ebx
call fcn.0040a4d8
test al, al
je 0x46f598
mov eax, 0x4ae120
mov edx, ebx
call fcn.0042cd78
jmp 0x46f598
cmp byte [ebp + 0xc], 0
je 0x46f39e
lea edx, [ebp - 0xa0]
mov eax, 0x4c219c
call fcn.00462424
cmp byte [ebp - 0xa], 0
jne 0x46f598
cmp byte [ebp + 0x10], 0
je 0x46f42a
mov eax, 0x4c219c
call fcn.0046241c
test eax, eax
je 0x46f42a
push 0
push 0
push 0
lea ecx, [ebp - 0x4a0]
mov eax, 0x4c219c
mov edx, ebx
call fcn.004624c4
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040edcc
test eax, eax
je 0x46f3f4
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x46f598
mov edx, 0x4a7e70
lea eax, [ebp - 0x4a0]
call fcn.0040bd60
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040edcc
test eax, eax
je 0x46f42a
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x46f598
push 0xc30
push 0
lea eax, [ebp - 0x10d0]
push eax
call fcn.00494848
add esp, 0xc
lea edx, [ebp - 0x10d0]
mov eax, ebx
call fcn.0040a978
call fcn.0040ff8c
test eax, eax
je 0x46f494
test esi, esi
je 0x46f460
cmp word [esi], 0
jne 0x46f494
lea edx, [ebp - 0x20d0]
push edx
push 0x800
call sub.KERNEL32.DLL_GetCurrentDirectoryW
lea eax, [ebp - 0x20d0]
call fcn.0040ef90
test al, al
jne 0x46f494
lea esi, [ebp - 0x18d0]
mov ecx, 0x10000000
mov edx, esi
mov eax, ebx
call fcn.00410004
mov eax, esi
call fcn.0040ed7c
lea edx, [ebp - 0xcd0]
call fcn.0040a9c0
mov ecx, dword [0x4c23a4]
mov eax, 0x4c219c
mov dword [ebp - 0x4a4], ecx
call fcn.0046241c
test eax, eax
je 0x46f4c7
or dword [ebp - 0x4b4], 4
mov edi, dword [ebp - 4]
test edi, edi
jne 0x46f50a
lea eax, [ebp - 0x2570]
call fcn.00413750
lea eax, [ebp - 0x2544]
call fcn.00413750
lea eax, [ebp - 0x2518]
call fcn.00413750
push 0
lea ecx, [ebp - 0x3184]
mov edx, esi
mov eax, ebx
call fcn.00412878
test al, al
je 0x46f50a
lea edi, [ebp - 0x3184]
test edi, edi
je 0x46f53e
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 [0x4c473c]
mov eax, dword [ebp - 0x4d0]
mov edx, dword [ebp - 0x4cc]
add dword [0x4c4748], eax
adc dword [0x4c474c], edx
lea edx, [ebp - 0x10d0]
mov eax, dword [ebp + 0x18]
call fcn.0046b4d4
mov ebx, eax
mov eax, 0x35c
inc ebx
push ebx
call fcn.00411fe8
push eax
lea edx, [ebp - 0x3284]
push edx
call fcn.00497928
add esp, 0xc
lea edx, [ebp - 0x3284]
mov eax, 0x4c19c4
call fcn.004492f8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14