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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x496980]
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.00440bf0
push ebx
call fcn.0042dd5b
add esp, 0x10
test eax, eax
jne 0x412a1c
push esi
call fcn.0042dd5b
pop ecx
test eax, eax
jne 0x412a1c
test edi, edi
mov eax, 0x465c7b
push 0x200
cmovne eax, edi
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.00440bf0
push ebx
call fcn.0044a680
add esp, 0x10
cmp eax, 0x104
jb 0x412a2d
push ebx
call fcn.0042cc5f
mov edi, eax
push esi
mov dword [ebp - 0x214], edi
call fcn.0042ccf0
mov dword [ebp - 0x20c], eax
pop ecx
pop ecx
test edi, edi
je 0x412a11
test eax, eax
je 0x412a0e
push eax
push edi
call fcn.0044c2b8
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x4129f3
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4129f3
test bl, 2
je 0x4129a3
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.0044c2b8
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x4129f3
test bl, 4
je 0x4129cd
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.0044c2b8
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x4129f3
test bl, 1
je 0x4129f3
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.0044c2b8
pop ecx
pop ecx
mov edi, eax
push dword [ebp - 0x214]
call fcn.0044a2ff
push dword [ebp - 0x20c]
call fcn.0044a2ff
jmp 0x412abb
push edi
jmp 0x412a16
test eax, eax
je 0x412a1c
push eax
call fcn.0044a2ff
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043f5c5
leave
ret
push esi
push ebx
call fcn.0044c2cf
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x412ac5
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x412a1c
test bl, 2
je 0x412a73
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.0044c2cf
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x412ac5
test bl, 4
je 0x412a98
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.0044c2cf
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x412ac5
test bl, 1
je 0x412a1c
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.0044c2cf
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x412a1c
xor ebx, ebx
push ebx
push 4
push ebx
push edi
call fcn.0044c5ff
add esp, 0x10
test eax, eax
je 0x412b0d
mov eax, dword [0x4a1910]
inc eax
mov dword [0x4a1910], eax
cmp eax, 0xa
jge 0x412b0d
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.0042ef5e
add esp, 0x18
mov esi, ebx
cmp dword [0x4a0910], ebx
je 0x412b29
cmp esi, 0xff
jge 0x412b92
inc esi
cmp dword [esi*4 + 0x4a0910], ebx
jne 0x412b17
mov ebx, dword [ebp - 0x210]
mov dword [esi*4 + 0x4a0910], edi
call fcn.00435f53
push dword [ebp - 0x208]
mov dword [esi*4 + 0x4a0d10], eax
call fcn.0044a680
pop ecx
push 1
push dword [ebp - 0x218]
mov dword [ebp - 0x210], eax
call fcn.0044a680
pop ecx
mov ecx, dword [ebp - 0x210]
add ecx, 0xa
add ecx, eax
push ecx
call fcn.0044a2f4
mov dword [esi*4 + 0x4a0410], eax
pop ecx
pop ecx
test eax, eax
jne 0x412c3b
and dword [esi*4 + 0x4a0910], eax
mov eax, edi
jmp 0x412a1e
mov edx, ebx
mov ecx, ebx
or ebx, 0xffffffff
mov eax, dword [ecx*4 + 0x4a0d10]
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 0x412b99
mov eax, dword [0x4a1914]
mov ecx, esi
mov ebx, dword [ebp - 0x210]
inc eax
shl ecx, 2
mov dword [0x4a1914], eax
mov dword [ebp - 0x20c], ecx
cmp eax, 0xa
jge 0x412c07
push dword [ecx + 0x4a0410]
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.0042ef5e
mov ecx, esi
add esp, 0x18
shl ecx, 2
jmp 0x412c0d
mov dword [ebp - 0x20c], ecx
and dword [ecx + 0x4a0910], 0
mov eax, dword [ecx + 0x4a0410]
test eax, eax
je 0x412b2f
push eax
call fcn.0044a2ff
mov eax, dword [ebp - 0x20c]
pop ecx
and dword [eax + 0x4a0410], 0
jmp 0x412b2f
push dword [ebp - 0x208]
push eax
call fcn.0044a360
pop ecx
pop ecx
cmp esi, 0x100
jae 0x412d65
push str.rwbt
push ebx
mov byte [esi + 0x4a0810], 0
call fcn.0042f0d8
pop ecx
pop ecx
test eax, eax
je 0x412c74
or byte [esi + 0x4a0810], 1
push 0x46a35c
push ebx
call fcn.0042f0d8
pop ecx
pop ecx
test eax, eax
je 0x412c8c
or byte [esi + 0x4a0810], 2
push 0x46a360
push ebx
call fcn.0042f0d8
pop ecx
pop ecx
test eax, eax
je 0x412ca4
or byte [esi + 0x4a0810], 4
push 0x46a364
push ebx
call fcn.0042f0d8
pop ecx
pop ecx
test eax, eax
je 0x412cbc
or byte [esi + 0x4a0810], 8
push 0x465c84
push ebx
call fcn.0042f0d8
pop ecx
pop ecx
test eax, eax
je 0x412cd4
or byte [esi + 0x4a0810], 0x10
push 0x46a368
push ebx
call fcn.0042f0d8
pop ecx
pop ecx
test eax, eax
je 0x412cec
or byte [esi + 0x4a0810], 0x20
mov ecx, dword [ebp - 0x210]
mov eax, dword [esi*4 + 0x4a0410]
inc ecx
push dword [ebp - 0x218]
add eax, ecx
push eax
mov dword [esi*4 + 0x4a1110], eax
call fcn.0044a360
mov eax, dword [ebp + 0x14]
mov dword [esi*4 + 0x4a1510], eax
lea eax, [ebp - 0x204]
push eax
call fcn.0042dd5b
add esp, 0xc
test eax, eax
jne 0x412b8b
cmp dword [0x4a1918], eax
jne 0x412b8b
lea eax, [ebp - 0x204]
mov dword [0x4a1918], 1
push eax
push 0x465678
call fcn.0040d7f3
and dword [0x4a1918], 0
pop ecx
pop ecx
jmp 0x412b8b
call fcn.0043f77b
int3