Function at 0x404350
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x548
mov eax, dword [str.CSysInfo.BIN]
mov edx, dword [0x407048]
mov dword [esp + 0x14], eax
mov al, byte [0x40704c]
mov dword [esp + 0x10], ecx
mov byte [esp + 0x20], al
mov ecx, dword [0x407044]
mov eax, dword [0x407038]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x28], eax
mov eax, dword [str.CSysCan.BIN]
mov word [esp + 0x21], cx
mov dword [esp + 0x1c], edx
mov edx, dword [str.CSysBak.BIN]
mov dword [esp + 0x34], eax
mov eax, dword [0x407030]
mov byte [esp + 0x23], cl
mov ecx, dword [0x40703c]
mov dword [esp + 0x24], edx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x54c]
push ebx
mov dword [esp + 0x30], ecx
mov ecx, dword [0x40702c]
xor edx, edx
push ebp
push esi
cmp eax, edx
push edi
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x50], edx
jne 0x4043ec
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x548
ret 4
mov ecx, 0x3d
xor eax, eax
lea edi, [esp + 0x358]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x18], edx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x24]
stosw word es:[edi], ax
mov dword [esp + 0x10], ecx
mov edi, dword [esp + 0x55c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x54]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x24]
call fcn.00404640
test eax, eax
je 0x4043dd
push 0
push 0x80
push 3
push 0
push 3
lea ecx, [esp + 0x68]
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4043dd
push 0
push 0
push 0
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x1c]
push 0
push edx
lea eax, [esp + 0x160]
push 0x200
push eax
push esi
call edi
push 0
push 0
push 0
push esi
call ebx
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x360]
push 0x200
push edx
push esi
call ebp
push 0
push 0
push 0
push esi
call ebx
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x160]
push 0x200
push ecx
push esi
call ebp
push 2
push 0
push 0xfffffe00
push esi
call ebx
lea edx, [esp + 0x1c]
push 0
push edx
lea eax, [esp + 0x160]
push 0x200
push eax
push esi
call edi
push 2
push 0
push 0xfffffe00
push esi
call ebx
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x360]
push 0x200
push edx
push esi
call ebp
push 2
push 0
push 0xfffffe00
push esi
call ebx
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x160]
push 0x200
push ecx
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
inc eax
add edx, 0x10
cmp eax, 3
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
jb 0x404416
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x548
ret 4