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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x55f900]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x204]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
push 0x200
push 0
push eax
mov dword [ebp - 0x208], ebx
mov dword [ebp - 0x210], esi
call fcn.004c37f0
push ebx
call fcn.0048c30a
add esp, 0x10
test eax, eax
jne 0x422bc8
push esi
call fcn.0048c30a
pop ecx
test eax, eax
jne 0x422bc8
test edi, edi
mov eax, 0x4e9b8e
push 0x200
cmovne eax, edi
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.004c37f0
push ebx
call fcn.004cd280
add esp, 0x10
cmp eax, 0x104
jb 0x422bd9
push ebx
call fcn.0048abbd
mov edi, eax
push esi
mov dword [ebp - 0x214], edi
call fcn.0048acaa
mov dword [ebp - 0x20c], eax
pop ecx
pop ecx
test edi, edi
je 0x422bbd
test eax, eax
je 0x422bba
push eax
push edi
call fcn.004cf027
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x422b9f
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x422b9f
test bl, 2
je 0x422b4f
mov edi, dword [ebp - 0x214]
xor ebx, 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x20c]
push edi
call fcn.004cf027
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x422b9f
test bl, 4
je 0x422b79
mov edi, dword [ebp - 0x214]
xor ebx, 4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x20c]
push edi
call fcn.004cf027
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x422b9f
test bl, 1
je 0x422b9f
mov edi, dword [ebp - 0x214]
xor ebx, 1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x20c]
push edi
call fcn.004cf027
pop ecx
pop ecx
mov edi, eax
push dword [ebp - 0x214]
call fcn.004cceff
push dword [ebp - 0x20c]
call fcn.004cceff
jmp 0x422c67
push edi
jmp 0x422bc2
test eax, eax
je 0x422bc8
push eax
call fcn.004cceff
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c2120
leave
ret
push esi
push ebx
call fcn.004cf03e
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x422c71
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x422bc8
test bl, 2
je 0x422c1f
mov edi, dword [ebp - 0x208]
xor ebx, 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
push edi
call fcn.004cf03e
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x422c71
test bl, 4
je 0x422c44
mov edi, dword [ebp - 0x208]
xor ebx, 4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
push edi
call fcn.004cf03e
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x422c71
test bl, 1
je 0x422bc8
xor ebx, 1
push ebx
mov ebx, dword [ebp - 0x208]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
push ebx
call fcn.004cf03e
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x422bc8
xor ebx, ebx
push ebx
push 4
push ebx
push edi
call fcn.004cf36e
add esp, 0x10
test eax, eax
je 0x422cb9
mov eax, dword [0x56a298]
inc eax
mov dword [0x56a298], eax
cmp eax, 0xa
jge 0x422cb9
push str._GetLastError_
push esi
push dword [ebp - 0x208]
lea eax, [ebp - 0x204]
push str.:2:fopen_wrapper___s_____s___EAP:_setvbuf__IONBF__FAILED:__s
push 0x200
push eax
call fcn.0048d960
add esp, 0x18
mov esi, ebx
cmp dword [0x569298], ebx
je 0x422cd5
cmp esi, 0xff
jge 0x422d3e
inc esi
cmp dword [esi*4 + 0x569298], ebx
jne 0x422cc3
mov ebx, dword [ebp - 0x210]
mov dword [esi*4 + 0x569298], edi
call fcn.004b729a
push dword [ebp - 0x208]
mov dword [esi*4 + 0x569698], eax
call fcn.004cd280
pop ecx
push 1
push dword [ebp - 0x218]
mov dword [ebp - 0x210], eax
call fcn.004cd280
pop ecx
mov ecx, dword [ebp - 0x210]
add ecx, 0xa
add ecx, eax
push ecx
call fcn.004ccef4
mov dword [esi*4 + 0x568d98], eax
pop ecx
pop ecx
test eax, eax
jne 0x422de7
and dword [esi*4 + 0x569298], eax
mov eax, edi
jmp 0x422bca
mov edx, ebx
mov ecx, ebx
or ebx, 0xffffffff
mov eax, dword [ecx*4 + 0x569698]
mov esi, ecx
cmp eax, ebx
inc ecx
cmovae esi, edx
cmp eax, ebx
mov edx, esi
cmovae eax, ebx
mov ebx, eax
cmp ecx, 0x100
jl 0x422d45
mov eax, dword [0x56a29c]
mov ecx, esi
mov ebx, dword [ebp - 0x210]
inc eax
shl ecx, 2
mov dword [0x56a29c], eax
mov dword [ebp - 0x20c], ecx
cmp eax, 0xa
jge 0x422db3
push dword [ecx + 0x568d98]
lea eax, [ebp - 0x204]
push ebx
push dword [ebp - 0x208]
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.0048d960
mov ecx, esi
add esp, 0x18
shl ecx, 2
jmp 0x422db9
mov dword [ebp - 0x20c], ecx
and dword [ecx + 0x569298], 0
mov eax, dword [ecx + 0x568d98]
test eax, eax
je 0x422cdb
push eax
call fcn.004cceff
mov eax, dword [ebp - 0x20c]
pop ecx
and dword [eax + 0x568d98], 0
jmp 0x422cdb
push dword [ebp - 0x208]
push eax
call fcn.004ccf60
pop ecx
pop ecx
cmp esi, 0x100
jae 0x422f11
push str.rwbt
push ebx
mov byte [esi + 0x569198], 0
call fcn.0048dada
pop ecx
pop ecx
test eax, eax
je 0x422e20
or byte [esi + 0x569198], 1
push 0x4f666c
push ebx
call fcn.0048dada
pop ecx
pop ecx
test eax, eax
je 0x422e38
or byte [esi + 0x569198], 2
push 0x4f6670
push ebx
call fcn.0048dada
pop ecx
pop ecx
test eax, eax
je 0x422e50
or byte [esi + 0x569198], 4
push 0x4f6674
push ebx
call fcn.0048dada
pop ecx
pop ecx
test eax, eax
je 0x422e68
or byte [esi + 0x569198], 8
push 0x4ea4ac
push ebx
call fcn.0048dada
pop ecx
pop ecx
test eax, eax
je 0x422e80
or byte [esi + 0x569198], 0x10
push 0x4f6678
push ebx
call fcn.0048dada
pop ecx
pop ecx
test eax, eax
je 0x422e98
or byte [esi + 0x569198], 0x20
mov ecx, dword [ebp - 0x210]
mov eax, dword [esi*4 + 0x568d98]
inc ecx
push dword [ebp - 0x218]
add eax, ecx
push eax
mov dword [esi*4 + 0x569a98], eax
call fcn.004ccf60
mov eax, dword [ebp + 0x14]
mov dword [esi*4 + 0x569e98], eax
lea eax, [ebp - 0x204]
push eax
call fcn.0048c30a
add esp, 0xc
test eax, eax
jne 0x422d37
cmp dword [0x56a2a0], eax
jne 0x422d37
lea eax, [ebp - 0x204]
mov dword [0x56a2a0], 1
push eax
push 0x4e8ad8
call fcn.0041cce9
and dword [0x56a2a0], 0
pop ecx
pop ecx
jmp 0x422d37
call fcn.004c22cb
int3