Function at 0x496a84
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x496aa0
call fcn.00497e08
pop ebx
pop ebp
ret
test byte [ebp + 0xc], 2
je 0x496abc
test bl, 1
je 0x496abc
call fcn.0049bb00
mov dword [eax], 5
or eax, 0xffffffff
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret

Function at 0x496ca0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
call fcn.004979a4
test byte [ebp + 0xd], 0xc0
jne 0x496cc4
mov eax, dword [0x4ba464]
mov edx, dword [eax]
and edx, 0xc000
or dword [ebp + 0xc], edx
test byte [ebp + 0xd], 0x80
jne 0x496cd1
or dword [ebp + 0xc], 0x4000
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
cmp ecx, 0x500
jg 0x496cfe
je 0x496d10
sub ecx, 0x100
je 0x496d1e
sub ecx, 0x100
je 0x496d25
sub ecx, 0x100
je 0x496d17
jmp 0x496d2c
sub ecx, 0x600
je 0x496d25
sub ecx, 0x100
je 0x496d10
jmp 0x496d2c
mov edi, 1
jmp 0x496d31
mov edi, 2
jmp 0x496d31
mov edi, 4
jmp 0x496d31
mov edi, 5
jmp 0x496d31
mov edi, 3
test byte [ebp + 0xd], 1
je 0x496d58
lea eax, [ebp + 0x10]
add eax, 4
mov eax, dword [eax - 4]
and eax, dword [0x4b9edc]
test al, 0x80
je 0x496d51
mov ebx, 0x80
jmp 0x496d6a
mov ebx, 1
jmp 0x496d6a
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x496d6a
xor ebx, ebx
mov eax, dword [ebp + 0xc]
and eax, 3
sub eax, 1
jb 0x496d7c
je 0x496d85
dec eax
je 0x496d8e
jmp 0x496d97
mov dword [ebp - 4], SysStringLen
jmp 0x496da6
mov dword [ebp - 4], 0x40000000
jmp 0x496da6
mov dword [ebp - 4], 0xc0000000
jmp 0x496da6
push 1
call fcn.00497d9c
pop ecx
mov ebx, eax
jmp 0x496e96
mov eax, dword [ebp + 0xc]
and eax, 0x70
sub eax, 0x10
je 0x496dc2
sub eax, 0x10
je 0x496dc9
sub eax, 0x10
je 0x496dd2
sub eax, 0x10
je 0x496ddb
jmp 0x496ddb
xor edx, edx
mov dword [ebp - 8], edx
jmp 0x496de2
mov dword [ebp - 8], 1
jmp 0x496de2
mov dword [ebp - 8], 2
jmp 0x496de2
mov dword [ebp - 8], 3
mov dword [ebp - 0x14], 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0xc]
and eax, 0x80
cmp eax, 1
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
push 0
push ebx
push edi
push ecx
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp eax, 0xffffffff
jne 0x496e4f
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
and ebx, 0xffff
cmp ebx, 0x6e
jne 0x496e44
test byte [ebp + 0xd], 1
je 0x496e3f
mov ebx, 0x50
jmp 0x496e44
mov ebx, 2
push ebx
call fcn.00497d9c
pop ecx
mov ebx, eax
jmp 0x496e96
mov edi, esi
push edi
call fcn.00496c04
pop ecx
test eax, eax
je 0x496e63
or dword [ebp + 0xc], 0x2000
test bl, 1
jne 0x496e6f
or dword [ebp + 0xc], 0x100
and dword [ebp + 0xc], 0xfffff8ff
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.00497ac4
add esp, 8
mov ebx, eax
inc eax
jne 0x496e96
push 4
call fcn.00497d9c
pop ecx
push esi
call sub.KERNEL32.DLL_CloseHandle
call fcn.004979d8
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret