Function at 0x442946
Capabilities:
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x4e91cc
call fcn.004e1580
sub esp, 0x8a4
push ebx
push esi
push edi
mov esi, ecx
and dword [ebp - 4], 0
lea eax, [ebp - 0xb0]
push 0x2000
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x442983
push 3
jmp 0x442b70
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [ebp - 0x28]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x44297c
lea edi, [esi + 0x58]
mov dword [ebp - 0x24], 0x4ff674
push edi
mov dword [ebp - 0x20], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x10]
and dword [esi + 0x48], 0
and dword [esi + 0x4c], 0
mov dword [esi + 0x40], eax
lea eax, [ebp + 8]
lea ecx, [esi + 0x50]
push eax
mov byte [ebp - 4], 2
mov dword [esi + 0x44], ebx
call sub.MFC42.DLL_CString::operator_1
lea eax, [ebp + 0xc]
lea ecx, [esi + 0x54]
push eax
call sub.MFC42.DLL_CString::operator_1
inc dword [esi + 0x2c]
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathIsSameRootA]
test eax, eax
je 0x442a4a
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll__lclose]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], 0x4ff674
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x10]
mov ecx, esi
add dword [esi + 0x48], eax
mov byte [ebp - 4], 3
adc dword [esi + 0x4c], ebx
add dword [esi + 0x38], eax
adc dword [esi + 0x3c], ebx
xor ebx, ebx
push ebx
push ebx
push 2
call fcn.00442cbf
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x442b71
xor ebx, ebx
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x442a6f
push 4
jmp 0x442b70
push ebx
push ebx
push ebx
mov ecx, esi
call fcn.00442cbf
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__mbsicmp]
neg eax
sbb eax, eax
pop ecx
inc eax
cmp dword [esi + 8], ebx
pop ecx
mov dword [ebp - 0x20], eax
jne 0x442b48
jmp 0x442a9d
mov eax, dword [ebp - 0x20]
cmp eax, ebx
jne 0x442b57
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x8b0]
push 0x800
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x442b34
cmp dword [ebp - 0x18], ebx
push ebx
je 0x442b38
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x8b0]
push dword [ebp - 0x18]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebx
je 0x442b44
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jne 0x442b44
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
add dword [esi + 0x48], eax
push edi
adc dword [esi + 0x4c], ecx
add dword [esi + 0x38], eax
adc dword [esi + 0x3c], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, dword [esi + 0x70]
cmp ecx, dword [esi + 0x74]
jb 0x442b29
push ebx
push ebx
push 1
mov ecx, esi
mov dword [esi + 0x70], eax
call fcn.00442cbf
cmp dword [esi + 8], ebx
je 0x442a9a
jmp 0x442b4c
push 6
jmp 0x442b70
push ebx
push 2
mov ecx, esi
call fcn.00442cbf
jmp 0x442b4c
push 7
jmp 0x442b70
cmp eax, ebx
jne 0x442b57
push ebx
push ebx
push 2
mov ecx, esi
call fcn.00442cbf
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll__lclose]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 8], ebx
je 0x442b71
push 8
pop ebx
and byte [ebp - 4], 0
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8