Function at 0x1028aad
Capabilities:
Read file via mapping
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
or dword [ebp - 4], 0xffffffff
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
xor ebx, ebx
xor esi, esi
mov dword [ebp - 8], 0x400000
mov dword [ebp - 0xc], ebx
cmp edi, ebx
je 0x1028af6
test byte [edi + 4], 0x40
je 0x1028add
mov eax, dword [edi + 0x20]
mov dword [ebp - 8], eax
call fcn.01028a35
test eax, eax
jne 0x1028aef
test dword [edi + 4], 0x400
je 0x1028af6
mov dword [ebp - 0xc], 1
cmp dword [ebp + 8], ebx
je 0x1028c8c
cmp dword [ebp - 8], 0x100000
jb 0x1028c8c
cmp dword [ebp - 0xc], ebx
jne 0x1028b52
push 0x80
push 1
push 0xc0000000
push dword [ebp + 8]
call fcn.0101dbcd
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x1028cc8
push 0x1060
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebx
jne 0x1028b90
push 8
jmp 0x1028c8e
push ebx
push dword [ebp - 8]
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x1028cb4
push ebx
push ebx
push ebx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
je 0x1028cb4
push dword [ebp - 8]
push ebx
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 8]
mov dword [esi + 0x20], eax
xor eax, eax
mov dword [esi], 0x43534552
mov dword [esi + 4], 0x474553
mov dword [esi + 8], 1
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
lea edi, [esi + 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
or eax, 0xffffffff
lea edi, [esi + 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x4c], eax
cmp eax, ebx
jne 0x1028c42
push ebx
lea eax, [ebp + 0x14]
push eax
mov edi, 0x1060
push edi
push esi
push dword [ebp - 4]
mov dword [ebp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1028c94
cmp dword [ebp + 0x14], edi
je 0x1028c0b
push 0x18
jmp 0x1028c8e
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push dword [ebp + 0x18]
push dword [ebp - 8]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.010207d8
mov edi, eax
jmp 0x1028c88
push 0x18
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
je 0x1028b4b
push dword [ebp + 8]
mov dword [edi], 3
call fcn.0101e529
mov dword [edi + 0xc], eax
cmp eax, ebx
je 0x1028b4b
mov eax, dword [ebp - 4]
mov dword [edi + 0x10], esi
add esi, 0x1060
mov dword [edi + 4], eax
mov dword [edi + 0x14], esi
mov eax, edi
jmp 0x1028cca
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebx
je 0x1028cb4
push esi
cmp dword [ebp - 0xc], ebx
je 0x1028ca6
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x1028cb4
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0xffffffff
je 0x1028cc8
cmp dword [ebp - 4], ebx
je 0x1028cc8
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14