Function at 0x42ffa0
Capabilities:
Check if file exists
Get file attributes
Move file
Read file on windows

Disassembly:
sub esp, 0x51c
push ebx
push ebp
push esi
mov esi, ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x20]
lea ebp, [esi + 0x34]
push ebp
push eax
push 0x5965b8
push str._sconfig_d__s.key
lea ecx, [esp + 0x334]
xor ebx, ebx
push 0x207
push ecx
mov dword [esi + 0x1780], ebx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edx, [esp + 0x33c]
push 0x581660
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x20
cmp edi, ebx
je 0x430029
push edi
push 1
lea eax, [esi + 0x1784]
push 0x330
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x43001f
mov dword [esi + 0x1780], eax
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [esi + 0x1780]
mov edx, 1
cmp eax, edx
je 0x43029c
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x18]
mov dword [esp + 0x14], edx
push ecx
push ebp
mov ecx, 0x593b60
stosb byte es:[edi], al
call fcn.0042e000
test eax, eax
je 0x4301e4
push ebp
mov ecx, 0x593b60
call fcn.0042d8e0
mov edi, eax
cmp edi, ebx
je 0x4301e4
mov eax, dword [edi + 0xd4]
mov dword [esp + 0x10], ebx
cmp eax, ebx
jle 0x4301a9
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ebp, ebp
mov ecx, dword [edi + 0xd0]
mov eax, dword [esi + 0x20]
mov edx, ebp
add edx, ecx
lea ecx, [esp + 0x11c]
push edx
push eax
push 0x5965b8
push str._sconfig_d__s.key
push 0x207
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x18
lea edx, [esp + 0x11c]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x430154
mov edx, dword [edi + 0xd0]
mov eax, ebp
add eax, edx
push 0x3a
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
test eax, eax
je 0x4300f7
mov byte [eax], 0
mov eax, dword [edi + 0xd0]
mov edx, dword [esi + 0x20]
mov ecx, ebp
add ecx, eax
lea eax, [esp + 0x11c]
push ecx
push edx
push 0x5965b8
push str._sconfig_d__s.key
push 0x207
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x18
lea ecx, [esp + 0x11c]
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x430173
mov eax, dword [esp + 0x10]
mov ecx, dword [edi + 0xd4]
inc eax
add ebp, 0xa0
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x43009c
jmp 0x4301a9
mov eax, dword [esp + 0x10]
mov ebp, dword [edi + 0xd0]
push 0x103
lea edx, [eax + eax*4]
lea eax, [esp + 0x1c]
shl edx, 5
add edx, ebp
push edx
push eax
jmp 0x430190
mov eax, dword [esp + 0x10]
mov ebx, dword [edi + 0xd0]
push 0x103
lea edx, [esp + 0x1c]
lea ecx, [eax + eax*4]
shl ecx, 5
add ecx, ebx
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov byte [esp + 0x11b], 0
mov dword [esp + 0x14], 0
mov eax, dword [edi + 0xd0]
xor ebx, ebx
cmp eax, ebx
je 0x4301c4
push eax
call fcn.004c2eb0
add esp, 4
mov dword [edi + 0xd0], ebx
mov ecx, dword [edi + 0x15c]
cmp ecx, ebx
je 0x4301db
push 1
call fcn.0040ae20
mov dword [edi + 0x15c], ebx
push edi
call fcn.004c2eb0
add esp, 4
mov al, byte [esp + 0x18]
test al, al
je 0x43029c
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x18]
push eax
push ecx
push 0x5965b8
push str._sconfig_d__s.key
lea edx, [esp + 0x12c]
push 0x207
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [esp + 0x134]
push 0x581660
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x20
cmp edi, ebx
je 0x43029c
push edi
push 1
lea ecx, [esi + 0x1784]
push 0x330
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
push edi
jne 0x430293
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
jne 0x430277
lea edx, [esp + 0x324]
lea eax, [esp + 0x11c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push esi
mov dword [esi + 0x1780], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret