Function at 0x102ca8e
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
cmp edi, ebx
mov dword [ebp - 8], 0x400000
mov dword [ebp - 0xc], ebx
je 0x102cad6
test byte [edi + 4], 0x40
je 0x102cabe
mov eax, dword [edi + 0x20]
mov dword [ebp - 8], eax
call fcn.0102ca16
test eax, eax
jne 0x102cacf
test word [edi + 4], 0x400
je 0x102cad6
mov dword [ebp - 0xc], 1
cmp dword [ebp + 8], ebx
je 0x102cc6c
cmp dword [ebp - 8], 0x100000
jb 0x102cc6c
cmp dword [ebp - 0xc], ebx
jne 0x102cb32
push 0x80
push 1
push 0xc0000000
push dword [ebp + 8]
call fcn.0102341b
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x102cca8
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 0x102cb70
push 8
jmp 0x102cc6e
push ebx
push dword [ebp - 8]
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x102cc94
push ebx
push ebx
push ebx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
je 0x102cc94
push dword [ebp - 8]
push ebx
push esi
call fcn.01017f90
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]
cmp eax, ebx
mov dword [esi + 0x4c], eax
jne 0x102cc22
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 0x102cc74
cmp dword [ebp + 0x14], edi
je 0x102cbeb
push 0x18
jmp 0x102cc6e
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.01038f38
mov edi, eax
jmp 0x102cc68
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 0x102cb2b
push dword [ebp + 8]
mov dword [edi], 3
call fcn.0102451c
cmp eax, ebx
mov dword [edi + 0xc], eax
je 0x102cb2b
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 0x102ccaa
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebx
je 0x102cc94
cmp dword [ebp - 0xc], ebx
push esi
je 0x102cc86
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x102cc94
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0xffffffff
je 0x102cca8
cmp dword [ebp - 4], ebx
je 0x102cca8
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14