Function at 0x46f634
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 0x46f63d
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, 0x4c319c
xor ecx, ecx
mov edx, ebx
call fcn.004627e4
test al, al
jne 0x46f67c
cmp byte [ebp + 0x14], 0
jne 0x46f920
push 1
push 0
mov eax, 0x4c319c
mov ecx, esi
mov edx, ebx
call fcn.00461128
mov edi, eax
cmp edi, 1
je 0x46f706
cmp dword [ebp + 8], 1
jne 0x46f6d3
test edi, edi
jne 0x46f6d3
mov edx, 0x4a8e68
mov eax, ebx
call fcn.0040bea8
test al, al
jne 0x46f6bf
mov edx, 0x4a8e6c
mov eax, ebx
call fcn.0040bea8
test al, al
je 0x46f6d3
mov eax, 0x1fc
call fcn.0041202c
push eax
push ebx
call fcn.00448a7c
add esp, 8
cmp dword [ebp + 8], 0
je 0x46f920
inc edi
jne 0x46f920
xor edx, edx
mov eax, ebx
call fcn.0040a504
test al, al
je 0x46f920
mov eax, 0x4af120
mov edx, ebx
call fcn.0042ce2c
jmp 0x46f920
cmp byte [ebp + 0xc], 0
je 0x46f726
lea edx, [ebp - 0xa0]
mov eax, 0x4c319c
call fcn.00462744
cmp byte [ebp - 0xa], 0
jne 0x46f920
cmp byte [ebp + 0x10], 0
je 0x46f7b2
mov eax, 0x4c319c
call fcn.0046273c
test eax, eax
je 0x46f7b2
push 0
push 0
push 0
lea ecx, [ebp - 0x4a0]
mov eax, 0x4c319c
mov edx, ebx
call fcn.004627e4
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040ee00
test eax, eax
je 0x46f77c
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x46f920
mov edx, 0x4a8e70
lea eax, [ebp - 0x4a0]
call fcn.0040bd90
lea edx, [ebp - 0x4a0]
mov eax, ebx
call fcn.0040ee00
test eax, eax
je 0x46f7b2
lea ecx, [ebp - 0x4a0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x46f920
push 0xc30
push 0
lea eax, [ebp - 0x10d0]
push eax
call fcn.00494dd8
add esp, 0xc
lea edx, [ebp - 0x10d0]
mov eax, ebx
call fcn.0040a9a4
call fcn.0040ffc8
test eax, eax
je 0x46f81c
test esi, esi
je 0x46f7e8
cmp word [esi], 0
jne 0x46f81c
lea edx, [ebp - 0x20d0]
push edx
push 0x800
call sub.KERNEL32.DLL_GetCurrentDirectoryW
lea eax, [ebp - 0x20d0]
call fcn.0040efc4
test al, al
jne 0x46f81c
lea esi, [ebp - 0x18d0]
mov ecx, 0x10000000
mov edx, esi
mov eax, ebx
call fcn.00410040
mov eax, esi
call fcn.0040edb0
lea edx, [ebp - 0xcd0]
call fcn.0040a9ec
mov ecx, dword [0x4c33a4]
mov eax, 0x4c319c
mov dword [ebp - 0x4a4], ecx
call fcn.0046273c
test eax, eax
je 0x46f84f
or dword [ebp - 0x4b4], 4
mov edi, dword [ebp - 4]
test edi, edi
jne 0x46f892
lea eax, [ebp - 0x2570]
call fcn.004137a4
lea eax, [ebp - 0x2544]
call fcn.004137a4
lea eax, [ebp - 0x2518]
call fcn.004137a4
push 0
lea ecx, [ebp - 0x3184]
mov edx, esi
mov eax, ebx
call fcn.004128bc
test al, al
je 0x46f892
lea edi, [ebp - 0x3184]
test edi, edi
je 0x46f8c6
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 [0x4c573c]
mov eax, dword [ebp - 0x4d0]
mov edx, dword [ebp - 0x4cc]
add dword [0x4c5748], eax
adc dword [0x4c574c], edx
lea edx, [ebp - 0x10d0]
mov eax, dword [ebp + 0x18]
call fcn.0046b858
mov ebx, eax
mov eax, 0x35c
inc ebx
push ebx
call fcn.0041202c
push eax
lea edx, [ebp - 0x3284]
push edx
call fcn.00497eb8
add esp, 0xc
lea edx, [ebp - 0x3284]
mov eax, 0x4c29c4
call fcn.00449584
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14