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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x581900]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x210], edi
call fcn.004a73a0
add esp, 4
test eax, eax
jne 0x42c336
push edi
call fcn.004a73a0
add esp, 4
test eax, eax
jne 0x42c336
mov eax, dword [ebp - 0x208]
mov esi, 0x50cae7
test eax, eax
push 0x200
cmovne esi, eax
lea eax, [ebp - 0x204]
push 0
push eax
mov dword [ebp - 0x220], esi
call fcn.004e69c0
mov ecx, ebx
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42c1f4
sub ecx, edx
cmp ecx, 0x104
jb 0x42c350
push ebx
call fcn.004a4210
push dword [ebp - 0x210]
mov edi, eax
mov dword [ebp - 0x214], edi
call fcn.004a4510
add esp, 8
mov dword [ebp - 0x218], eax
test edi, edi
je 0x42c349
test eax, eax
je 0x42c32d
push eax
push edi
call fcn.004f0997
mov edi, eax
add esp, 8
mov dword [ebp - 0x20c], edi
test edi, edi
jne 0x42c312
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x42c312
mov ecx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test al, 2
je 0x42c2ae
mov edi, dword [ebp - 0x214]
xor eax, 2
push eax
push edi
mov dword [ebp - 0x208], eax
call ecx
push dword [ebp - 0x218]
push edi
call fcn.004f0997
mov edi, eax
add esp, 8
mov dword [ebp - 0x20c], edi
test edi, edi
jne 0x42c312
mov eax, dword [ebp - 0x208]
mov ecx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test al, 4
je 0x42c2e6
mov edi, dword [ebp - 0x214]
xor eax, 4
push eax
push edi
mov dword [ebp - 0x208], eax
call ecx
push dword [ebp - 0x218]
push edi
call fcn.004f0997
mov edi, eax
add esp, 8
mov dword [ebp - 0x20c], edi
test edi, edi
jne 0x42c312
mov eax, dword [ebp - 0x208]
test al, 1
je 0x42c312
mov edi, dword [ebp - 0x214]
xor eax, 1
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x218]
push edi
call fcn.004f0997
mov edi, eax
add esp, 8
mov dword [ebp - 0x20c], edi
push dword [ebp - 0x214]
call fcn.004eea9f
push dword [ebp - 0x218]
call fcn.004eea9f
jmp 0x42c40d
push edi
call fcn.004eea9f
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x42c336
push eax
jmp 0x42c32e
push edi
push ebx
call fcn.004f09ae
mov edi, eax
add esp, 8
mov dword [ebp - 0x20c], edi
test edi, edi
jne 0x42c418
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42c336
mov ecx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test al, 2
je 0x42c3b4
xor eax, 2
push eax
push ebx
mov dword [ebp - 0x208], eax
call ecx
push dword [ebp - 0x210]
push ebx
call fcn.004f09ae
mov edi, eax
add esp, 8
mov dword [ebp - 0x20c], edi
test edi, edi
jne 0x42c418
mov eax, dword [ebp - 0x208]
mov ecx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test al, 4
je 0x42c3e6
xor eax, 4
push eax
push ebx
mov dword [ebp - 0x208], eax
call ecx
push dword [ebp - 0x210]
push ebx
call fcn.004f09ae
mov edi, eax
add esp, 8
mov dword [ebp - 0x20c], edi
test edi, edi
jne 0x42c418
mov eax, dword [ebp - 0x208]
test al, 1
je 0x42c336
xor eax, 1
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [ebp - 0x210]
push ebx
call fcn.004f09ae
mov edi, eax
mov dword [ebp - 0x20c], edi
add esp, 8
test edi, edi
je 0x42c336
push 0
push 4
push 0
push edi
call fcn.004f0cde
add esp, 0x10
test eax, eax
je 0x42c460
mov eax, dword [0x58c298]
inc eax
mov dword [0x58c298], eax
cmp eax, 0xa
jge 0x42c460
push str._GetLastError_
push dword [ebp - 0x210]
lea eax, [ebp - 0x204]
push ebx
push str.:2:fopen_wrapper___s_____s___EAP:_setvbuf__IONBF__FAILED:__s
push 0x200
push eax
call fcn.004a94b0
add esp, 0x18
xor edi, edi
cmp dword [0x58b298], edi
je 0x42c572
nop
cmp edi, 0xff
jge 0x42c488
inc edi
cmp dword [edi*4 + 0x58b298], 0
jne 0x42c470
jmp 0x42c572
or ecx, 0xffffffff
xor edi, edi
mov dword [ebp - 0x208], ecx
xor ebx, ebx
mov edx, dword [ebx*4 + 0x58b698]
cmp edx, ecx
mov esi, edx
cmovae esi, ecx
mov ecx, dword [ebx*4 + 0x58b69c]
cmp ecx, esi
mov eax, ecx
cmovae eax, esi
cmp edx, dword [ebp - 0x208]
mov dword [ebp - 0x214], eax
mov eax, ebx
cmovae eax, edi
cmp ecx, esi
mov ecx, dword [ebp - 0x214]
lea edi, [ebx + 1]
cmovae edi, eax
mov eax, dword [ebx*4 + 0x58b6a0]
cmp eax, ecx
jae 0x42c4de
lea edi, [ebx + 2]
cmovae eax, ecx
mov ecx, dword [ebx*4 + 0x58b6a4]
cmp ecx, eax
jae 0x42c4ef
lea edi, [ebx + 3]
add ebx, 4
cmp ecx, eax
cmovae ecx, eax
mov dword [ebp - 0x208], ecx
cmp ebx, 0x100
jl 0x42c495
mov eax, dword [0x58c29c]
mov ebx, dword [ebp - 0x21c]
inc eax
mov dword [0x58c29c], eax
cmp eax, 0xa
jge 0x42c542
push dword [edi*4 + 0x58ad98]
lea eax, [ebp - 0x204]
push dword [ebp - 0x210]
push ebx
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.004a94b0
add esp, 0x18
mov eax, dword [edi*4 + 0x58ad98]
mov dword [edi*4 + 0x58b298], 0
test eax, eax
je 0x42c56c
push eax
call fcn.004eea9f
add esp, 4
mov dword [edi*4 + 0x58ad98], 0
mov esi, dword [ebp - 0x220]
mov eax, dword [ebp - 0x20c]
mov dword [edi*4 + 0x58b298], eax
call fcn.004d9850
mov ecx, ebx
mov dword [edi*4 + 0x58b698], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42c590
sub ecx, edx
mov edx, esi
mov dword [ebp - 0x21c], ecx
lea eax, [edx + 1]
mov dword [ebp - 0x220], eax
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x42c5b0
sub edx, dword [ebp - 0x220]
push 1
lea eax, [edx + 0xa]
add eax, ecx
push eax
call fcn.004eea94
mov ecx, eax
add esp, 8
mov dword [edi*4 + 0x58ad98], ecx
test ecx, ecx
jne 0x42c5f8
mov dword [edi*4 + 0x58b298], eax
mov eax, dword [ebp - 0x20c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
mov al, byte [ebx]
lea ebx, [ebx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x42c5f8
cmp edi, 0x100
jae 0x42c741
mov ebx, dword [ebp - 0x210]
push str.rwbt
push ebx
mov byte [edi + 0x58b198], al
call fcn.004a96e0
add esp, 8
test eax, eax
je 0x42c637
or byte [edi + 0x58b198], 1
push 0x5194ec
push ebx
call fcn.004a96e0
add esp, 8
test eax, eax
je 0x42c650
or byte [edi + 0x58b198], 2
push 0x5194f0
push ebx
call fcn.004a96e0
add esp, 8
test eax, eax
je 0x42c669
or byte [edi + 0x58b198], 4
push 0x5194f4
push ebx
call fcn.004a96e0
add esp, 8
test eax, eax
je 0x42c682
or byte [edi + 0x58b198], 8
push 0x50d2f4
push ebx
call fcn.004a96e0
add esp, 8
test eax, eax
je 0x42c69b
or byte [edi + 0x58b198], 0x10
push 0x5194f8
push ebx
call fcn.004a96e0
add esp, 8
test eax, eax
je 0x42c6b4
or byte [edi + 0x58b198], 0x20
mov ecx, dword [ebp - 0x21c]
inc ecx
add ecx, dword [edi*4 + 0x58ad98]
mov dword [edi*4 + 0x58ba98], ecx
sub ecx, esi
nop dword [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x42c6d0
mov eax, dword [ebp + 0x14]
mov dword [edi*4 + 0x58be98], eax
lea eax, [ebp - 0x204]
push eax
call fcn.004a73a0
add esp, 4
test eax, eax
jne 0x42c72a
cmp dword [0x58c2a0], eax
jne 0x42c72a
lea eax, [ebp - 0x204]
mov dword [0x58c2a0], 1
push eax
push 0x50bac8
call fcn.00424fd0
add esp, 8
mov dword [0x58c2a0], 0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x20c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
call fcn.004e523e
int3