Function at 0x43afc0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4a2660
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4eed38]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x18], esi
mov eax, dword [esi + 0x128]
sub eax, 0x10
push eax
call fcn.004015b0
lea ebp, [eax + 0x10]
add esp, 4
mov dword [esp + 0x14], ebp
xor ebx, ebx
mov dword [esp + 0x60], ebx
cmp dword [esi + 0xf8], ebx
je 0x43b2ca
cmp dword [ebp - 0xc], ebx
je 0x43b2ca
push 0x4b18f0
push ebp
call fcn.00483f2d
add esp, 8
cmp eax, ebx
je 0x43b2ca
mov ecx, dword [esi + 0xf0]
sub ecx, dword [esi + 0xec]
lea eax, [esi + 0xe0]
mov dword [esp + 0x1c], eax
mov eax, 0x7a44c6b
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x43b369
lea ecx, [esp + 0x40]
call fcn.0045bc62
push ebx
push ebp
lea ecx, [esp + 0x48]
mov byte [esp + 0x68], 1
call fcn.0045bcfa
test eax, eax
je 0x43b35b
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x43b118
lea ecx, [esp + 0x18]
call fcn.00401650
push ebp
lea ecx, [esp + 0x1c]
push str.Can_not_open_file___s_.
push ecx
mov byte [esp + 0x6c], 2
call fcn.00401ce0
mov edx, dword [esp + 0x24]
add esp, 0xc
push ebx
push ebx
push edx
call fcn.0045a9ee
lea ecx, [esp + 0x18]
call fcn.004014d0
lea ecx, [esp + 0x40]
mov byte [esp + 0x60], 0
call fcn.0045bc8b
lea ecx, [esp + 0x14]
call fcn.004014d0
xor eax, eax
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [esp + 0x24], edi
test edi, edi
je 0x43b14d
push edi
call fcn.00451e0a
add esp, 4
push 0
mov ebx, eax
lea eax, [esp + 0x24]
push eax
push edi
push ebx
push esi
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18]
call fcn.00408c60
mov esi, eax
test edi, edi
je 0x43b2af
lea ecx, [esp + 0x28]
call fcn.00440180
lea ecx, [esp + 0x28]
push ecx
push ebp
mov ecx, esi
mov byte [esp + 0x68], 3
call fcn.00444aa0
test eax, eax
je 0x43b2a6
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0043ab40
test eax, eax
je 0x43b308
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x34]
mov eax, 0x7a44c6b
imul ecx
sar edx, 3
mov edi, edx
shr edi, 0x1f
add edi, edx
xor esi, esi
test edi, edi
jle 0x43b2a6
jmp 0x43b1d0
mov ecx, dword [esp + 0x1c]
push esi
call fcn.00415ec0
push esi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], eax
call fcn.00415ec0
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x18]
mov al, byte [edx]
inc esi
cmp esi, edi
mov byte [ebx + ecx], al
jl 0x43b1d0
test edi, edi
jle 0x43b2a6
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x43b274
lea ecx, [esp + 0x18]
call fcn.00401650
push ebp
lea ecx, [esp + 0x1c]
push str.Can_not_create_file___s_.
push ecx
mov byte [esp + 0x6c], 4
call fcn.00401ce0
mov edx, dword [esp + 0x24]
add esp, 0xc
push 0
push 0
push edx
call fcn.0045a9ee
test ebx, ebx
je 0x43b25d
push ebx
call fcn.00451dff
add esp, 4
lea ecx, [esp + 0x18]
call fcn.004014d0
lea ecx, [esp + 0x28]
call fcn.0042ca80
jmp 0x43b0eb
mov ecx, dword [esp + 0x24]
push 0
lea eax, [esp + 0x20]
push eax
push ecx
push ebx
push esi
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x43b2a6
push ebx
call fcn.00451dff
add esp, 4
xor ebx, ebx
lea ecx, [esp + 0x28]
call fcn.0042ca80
test ebx, ebx
je 0x43b2bc
push ebx
call fcn.00451dff
add esp, 4
lea ecx, [esp + 0x40]
mov byte [esp + 0x60], 0
call fcn.0045bc8b
add ebp, 0xfffffff0
mov dword [esp + 0x60], 0xffffffff
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43b2ef
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov eax, 1
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
lea ecx, [esp + 0x18]
call fcn.00401650
push ebp
lea edx, [esp + 0x1c]
push str.PS_USER_IMG_file___s__is_changed_please_select_it_again.
push edx
mov byte [esp + 0x6c], 5
call fcn.00401ce0
mov eax, dword [esp + 0x24]
add esp, 0xc
push 0
push 0
push eax
call fcn.0045a9ee
test ebx, ebx
je 0x43b344
push ebx
call fcn.00451dff
add esp, 4
lea ecx, [esp + 0x18]
call fcn.004014d0
lea ecx, [esp + 0x28]
call fcn.0042ca80
jmp 0x43b0eb
lea ecx, [esp + 0x40]
mov byte [esp + 0x60], 0
call fcn.0045bc8b
lea ecx, [esp + 0x14]
call fcn.004014d0
jmp 0x43b2ef