Function at 0x4a0001
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x5092e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x1ff
lea eax, [ebp - 0x203]
mov edi, ecx
mov ebx, edx
push 0
push eax
mov dword [ebp - 0x210], edi
mov dword [ebp - 0x20c], ebx
mov dword [ebp - 0x218], esi
mov byte [ebp - 0x204], 0
call fcn.00401f80
add esp, 0xc
mov edx, edi
call fcn.00445b2f
test eax, eax
jne 0x4a017f
mov edx, ebx
call fcn.00445b2f
test eax, eax
jne 0x4a017f
test esi, esi
jne 0x4a0079
mov dword [ebp - 0x218], 0x4cd323
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.00401f80
push edi
call fcn.00401a80
add esp, 0x10
cmp eax, 0x104
jb 0x4a0190
mov eax, edi
call fcn.00445cfa
push ebx
mov esi, eax
call fcn.0044419e
mov edi, eax
pop ecx
mov dword [ebp - 0x214], edi
test esi, esi
je 0x4a0174
test edi, edi
je 0x4a016d
push edi
push esi
call fcn.00403f8c
pop ecx
pop ecx
mov dword [ebp - 0x208], eax
test eax, eax
jne 0x4a0157
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a0157
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test bl, 2
je 0x4a0113
xor ebx, 2
push ebx
push esi
call edi
push dword [ebp - 0x214]
push esi
call fcn.00403f8c
pop ecx
pop ecx
mov dword [ebp - 0x208], eax
test eax, eax
jne 0x4a0157
test bl, 4
je 0x4a0137
xor ebx, 4
push ebx
push esi
call edi
push dword [ebp - 0x214]
push esi
call fcn.00403f8c
pop ecx
pop ecx
mov dword [ebp - 0x208], eax
test eax, eax
jne 0x4a0157
test bl, 1
je 0x4a0157
xor ebx, 1
push ebx
push esi
call edi
push dword [ebp - 0x214]
push esi
call fcn.00403f8c
pop ecx
pop ecx
mov dword [ebp - 0x208], eax
push esi
call fcn.00401a00
push dword [ebp - 0x214]
call fcn.00401a00
jmp 0x4a0243
push esi
call fcn.00401a00
pop ecx
test edi, edi
je 0x4a017f
push edi
call fcn.00401a00
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401317
leave
ret
push ebx
push edi
call fcn.0040405f
pop ecx
pop ecx
mov dword [ebp - 0x208], eax
test eax, eax
jne 0x4a0252
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a017f
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test bl, 2
je 0x4a01e9
xor ebx, 2
push ebx
push dword [ebp - 0x210]
call edi
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.0040405f
pop ecx
pop ecx
mov dword [ebp - 0x208], eax
test eax, eax
jne 0x4a0252
test bl, 4
je 0x4a0217
xor ebx, 4
push ebx
push dword [ebp - 0x210]
call edi
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.0040405f
pop ecx
pop ecx
mov dword [ebp - 0x208], eax
test eax, eax
jne 0x4a0252
test bl, 1
je 0x4a017f
xor ebx, 1
push ebx
push dword [ebp - 0x210]
call edi
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
call fcn.0040405f
mov dword [ebp - 0x208], eax
cmp dword [ebp - 0x208], 0
pop ecx
pop ecx
je 0x4a017f
xor edi, edi
push edi
push 4
push edi
push dword [ebp - 0x208]
call fcn.00404076
add esp, 0x10
test eax, eax
je 0x4a02a3
inc dword [0x521aac]
cmp dword [0x521aac], 0xa
jge 0x4a02a3
push str._GetLastError_
push dword [ebp - 0x20c]
lea eax, [ebp - 0x204]
push dword [ebp - 0x210]
push str.:2:fopen_wrapper___s_____s___EAP:_setvbuf__IONBF__FAILED:__s
push 0x200
push eax
call fcn.004451a8
add esp, 0x18
xor ebx, ebx
cmp dword [0x522050], ebx
je 0x4a033b
cmp edi, 0xff
jge 0x4a02c5
inc edi
cmp dword [edi*4 + 0x522050], ebx
jne 0x4a02b1
jmp 0x4a033b
xor edi, edi
or edx, 0xffffffff
xor eax, eax
mov ecx, dword [eax*4 + 0x522450]
cmp ecx, edx
jae 0x4a02db
mov edi, eax
mov edx, ecx
inc eax
cmp eax, 0x100
jl 0x4a02cc
inc dword [0x521b4c]
cmp dword [0x521b4c], 0xa
jge 0x4a031e
push dword [edi*4 + 0x521b50]
lea eax, [ebp - 0x204]
push dword [ebp - 0x20c]
push dword [ebp - 0x210]
push str.:8:fopen_wrapper___s_____s___EAP:_the_register_is_full__This_indicates_an_fopen_fclose_leak__The_oldest_entry___s__has_been_deleted.
push 0x200
push eax
call fcn.004451a8
add esp, 0x18
lea esi, [edi*4 + 0x521b50]
mov eax, dword [esi]
mov dword [edi*4 + 0x522050], ebx
cmp eax, ebx
je 0x4a033b
push eax
call fcn.00401a00
pop ecx
mov dword [esi], ebx
mov eax, dword [ebp - 0x208]
mov esi, edi
mov dword [esi*4 + 0x522050], eax
call fcn.0041df75
push dword [ebp - 0x210]
mov dword [esi*4 + 0x522450], eax
call fcn.00401a80
pop ecx
push 1
push dword [ebp - 0x218]
mov ebx, eax
call fcn.00401a80
pop ecx
lea eax, [eax + ebx + 0xa]
push eax
call fcn.00401a3a
pop ecx
pop ecx
mov dword [esi*4 + 0x521b50], eax
test eax, eax
jne 0x4a039b
and dword [esi*4 + 0x522050], eax
mov eax, dword [ebp - 0x208]
jmp 0x4a0181
push dword [ebp - 0x210]
push eax
call fcn.00401ba0
push str.rwbt
push dword [ebp - 0x20c]
mov byte [edi + 0x521f50], 0
call fcn.004454c3
add esp, 0x10
test eax, eax
je 0x4a03cc
mov byte [edi + 0x521f50], 1
push 0x4d1c1c
push dword [ebp - 0x20c]
call fcn.004454c3
pop ecx
pop ecx
test eax, eax
je 0x4a03e9
or byte [edi + 0x521f50], 2
push 0x4d1c20
push dword [ebp - 0x20c]
call fcn.004454c3
pop ecx
pop ecx
test eax, eax
je 0x4a0406
or byte [edi + 0x521f50], 4
push 0x4d1c24
push dword [ebp - 0x20c]
call fcn.004454c3
pop ecx
pop ecx
test eax, eax
je 0x4a0423
or byte [edi + 0x521f50], 8
push 0x4cda34
push dword [ebp - 0x20c]
call fcn.004454c3
pop ecx
pop ecx
test eax, eax
je 0x4a0440
or byte [edi + 0x521f50], 0x10
push 0x4d1c28
push dword [ebp - 0x20c]
call fcn.004454c3
pop ecx
pop ecx
test eax, eax
je 0x4a045d
or byte [edi + 0x521f50], 0x20
mov eax, dword [esi*4 + 0x521b50]
push dword [ebp - 0x218]
lea eax, [eax + ebx + 1]
push eax
mov dword [esi*4 + 0x522850], eax
call fcn.00401ba0
mov eax, dword [ebp + 0xc]
pop ecx
pop ecx
lea edx, [ebp - 0x204]
mov dword [esi*4 + 0x522c50], eax
call fcn.00445b2f
test eax, eax
jne 0x4a0390
cmp dword [0x523050], eax
jne 0x4a0390
and dword [0x523050], eax
jmp 0x4a0390