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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x59a240]
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.004e4da0
push ebx
call fcn.0049f486
add esp, 0x10
test eax, eax
jne 0x42d468
push esi
call fcn.0049f486
pop ecx
test eax, eax
jne 0x42d468
test edi, edi
mov eax, 0x50c926
push 0x200
cmovne eax, edi
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.004e4da0
push ebx
call fcn.004ee800
add esp, 0x10
cmp eax, 0x104
jb 0x42d479
push ebx
call fcn.0049dc78
mov edi, eax
push esi
mov dword [ebp - 0x214], edi
call fcn.0049dd65
mov dword [ebp - 0x20c], eax
pop ecx
pop ecx
test edi, edi
je 0x42d45d
test eax, eax
je 0x42d45a
push eax
push edi
call fcn.004f07c7
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x42d43f
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x42d43f
test bl, 2
je 0x42d3ef
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.004f07c7
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x42d43f
test bl, 4
je 0x42d419
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.004f07c7
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x42d43f
test bl, 1
je 0x42d43f
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.004f07c7
pop ecx
pop ecx
mov edi, eax
push dword [ebp - 0x214]
call fcn.004ee46f
push dword [ebp - 0x20c]
call fcn.004ee46f
jmp 0x42d507
push edi
jmp 0x42d462
test eax, eax
je 0x42d468
push eax
call fcn.004ee46f
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3632
leave
ret
push esi
push ebx
call fcn.004f07de
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x42d511
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x42d468
test bl, 2
je 0x42d4bf
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.004f07de
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x42d511
test bl, 4
je 0x42d4e4
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.004f07de
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x42d511
test bl, 1
je 0x42d468
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.004f07de
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x42d468
xor ebx, ebx
push ebx
push 4
push ebx
push edi
call fcn.004f0b0e
add esp, 0x10
test eax, eax
je 0x42d559
mov eax, dword [0x5a5708]
inc eax
mov dword [0x5a5708], eax
cmp eax, 0xa
jge 0x42d559
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.004a0ddb
add esp, 0x18
mov esi, ebx
cmp dword [0x5a4708], ebx
je 0x42d575
cmp esi, 0xff
jge 0x42d5de
inc esi
cmp dword [esi*4 + 0x5a4708], ebx
jne 0x42d563
mov ebx, dword [ebp - 0x210]
mov dword [esi*4 + 0x5a4708], edi
call fcn.004ca9ca
push dword [ebp - 0x208]
mov dword [esi*4 + 0x5a4b08], eax
call fcn.004ee800
pop ecx
push 1
push dword [ebp - 0x218]
mov dword [ebp - 0x210], eax
call fcn.004ee800
pop ecx
mov ecx, dword [ebp - 0x210]
add ecx, 0xa
add ecx, eax
push ecx
call fcn.004ee464
mov dword [esi*4 + 0x5a4208], eax
pop ecx
pop ecx
test eax, eax
jne 0x42d687
and dword [esi*4 + 0x5a4708], eax
mov eax, edi
jmp 0x42d46a
mov edx, ebx
mov ecx, ebx
or ebx, 0xffffffff
mov eax, dword [ecx*4 + 0x5a4b08]
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 0x42d5e5
mov eax, dword [0x5a570c]
mov ecx, esi
mov ebx, dword [ebp - 0x210]
inc eax
shl ecx, 2
mov dword [0x5a570c], eax
mov dword [ebp - 0x20c], ecx
cmp eax, 0xa
jge 0x42d653
push dword [ecx + 0x5a4208]
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.004a0ddb
mov ecx, esi
add esp, 0x18
shl ecx, 2
jmp 0x42d659
mov dword [ebp - 0x20c], ecx
and dword [ecx + 0x5a4708], 0
mov eax, dword [ecx + 0x5a4208]
test eax, eax
je 0x42d57b
push eax
call fcn.004ee46f
mov eax, dword [ebp - 0x20c]
pop ecx
and dword [eax + 0x5a4208], 0
jmp 0x42d57b
push dword [ebp - 0x208]
push eax
call fcn.004ee4d0
pop ecx
pop ecx
cmp esi, 0x100
jae 0x42d7b1
push str.rwbt
push ebx
mov byte [esi + 0x5a4608], 0
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
je 0x42d6c0
or byte [esi + 0x5a4608], 1
push 0x51cf84
push ebx
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
je 0x42d6d8
or byte [esi + 0x5a4608], 2
push 0x51cf88
push ebx
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
je 0x42d6f0
or byte [esi + 0x5a4608], 4
push 0x51cf8c
push ebx
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
je 0x42d708
or byte [esi + 0x5a4608], 8
push 0x50d2b4
push ebx
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
je 0x42d720
or byte [esi + 0x5a4608], 0x10
push 0x51cf90
push ebx
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
je 0x42d738
or byte [esi + 0x5a4608], 0x20
mov ecx, dword [ebp - 0x210]
mov eax, dword [esi*4 + 0x5a4208]
inc ecx
push dword [ebp - 0x218]
add eax, ecx
push eax
mov dword [esi*4 + 0x5a4f08], eax
call fcn.004ee4d0
mov eax, dword [ebp + 0x14]
mov dword [esi*4 + 0x5a5308], eax
lea eax, [ebp - 0x204]
push eax
call fcn.0049f486
add esp, 0xc
test eax, eax
jne 0x42d5d7
cmp dword [0x5a5710], eax
jne 0x42d5d7
lea eax, [ebp - 0x204]
mov dword [0x5a5710], 1
push eax
push 0x50b870
call fcn.00425c08
and dword [0x5a5710], 0
pop ecx
pop ecx
jmp 0x42d5d7
call fcn.004e37db
int3