Function at 0x41e780
Capabilities:
Check if file exists
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0x40], ecx
cmp dword [ebp + 8], 0
je 0x41e79d
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41e7a4
xor eax, eax
jmp 0x41e9ab
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x41e7d0
xor eax, eax
jmp 0x41e9ab
mov dword [ebp - 4], 0
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 4], 0
jbe 0x41e7ff
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x41e9ab
cmp dword [ebp - 0xc], 0
ja 0x41e819
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x41e9ab
mov eax, dword [ebp - 0xc]
xor edx, edx
mov ecx, 0x20
div ecx
mov eax, 0x20
sub eax, edx
mov ecx, dword [ebp - 0xc]
lea edx, [ecx + eax + 0x20]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.004a9062
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
jne 0x41e862
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x41e9ab
mov eax, dword [ebp - 0x24]
push eax
push 0
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004b0ac0
add esp, 0xc
mov dword [ebp - 8], 0
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41e89f
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0xc]
je 0x41e8c2
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.004b2811
add esp, 4
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x41e9ab
mov ecx, dword [ebp - 0x40]
movzx edx, byte [ecx]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x40]
call fcn.0041e720
test eax, eax
jne 0x41e900
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
push eax
call fcn.004b2811
add esp, 4
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x41e9ab
mov dword [ebp - 0x18], 0
xor edx, edx
mov dword [ebp - 0x14], edx
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x41e946
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004b2811
add esp, 4
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x41e9ab
push 0
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41e98a
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0xc]
je 0x41e98a
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.004b2811
add esp, 4
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x41e9ab
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.004b2811
add esp, 4
mov eax, 1
mov esp, ebp
pop ebp
ret 4