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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1014
call fcn.100d5920
mov eax, dword [0x10121e98]
push ebx
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
mov dword [esp + 0x1018], eax
push edi
mov dword [esp + 0x14], ecx
je 0x100d1463
cmp byte [esi], 0
je 0x100d1463
mov eax, dword [ecx + 0x24]
test eax, eax
je 0x100d1463
mov dl, byte [ecx + 0x20]
test dl, dl
je 0x100d1205
push str.Const_Mode
push 3
jmp 0x100d146a
mov edi, dword [ebp + 8]
push 0
push 0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x100d1247
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d__point_d
push 6
call fcn.100d4230
add esp, 0x10
xor al, al
mov ecx, dword [esp + 0x101c]
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0
push 0x8000027
push 3
push 0
push 3
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x100d1295
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Open_file:__s__WinErr_d
push 3
call fcn.100d4230
add esp, 0x10
xor al, al
mov ecx, dword [esp + 0x101c]
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov byte [esp + 0x18], 0
mov ecx, 0x3ff
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
push 0x1000
lea ecx, [esp + 0x24]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0xc]
xor esi, esi
test ecx, ecx
je 0x100d13ab
test eax, eax
je 0x100d133b
mov edi, dword [ebp + 0xc]
lea edx, [esi + ecx]
cmp edx, edi
jbe 0x100d12e6
mov ecx, edi
sub ecx, esi
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
mov eax, dword [edx + 0x24]
push ecx
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100d1377
mov eax, dword [esp + 0x10]
cmp dword [esp + 0xc], eax
jne 0x100d1377
add esi, eax
cmp esi, edi
jae 0x100d13ae
push 0
lea ecx, [esp + 0x10]
push ecx
push 0x1000
lea edx, [esp + 0x24]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0xc]
test ecx, ecx
jne 0x100d12d0
jmp 0x100d13ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x100d13ab
mov eax, dword [ebp + 0x10]
push eax
push str.file:__s
push 4
call fcn.100d4230
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x101c]
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.100d4230
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x101c]
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edi, dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
jb 0x100d13d3
mov al, 1
mov ecx, dword [esp + 0x101c]
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edi, dword [ebp + 0xc]
mov eax, edi
sub eax, esi
cmp eax, 0x1000
mov ebx, 0x1000
ja 0x100d13e5
mov ebx, eax
xor eax, eax
push eax
mov ecx, 0x400
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [eax + 0x24]
push ebx
lea edx, [esp + 0x24]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100d1436
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x100d1436
add esi, eax
cmp esi, dword [ebp + 0xc]
jb 0x100d13d0
mov al, 1
mov ecx, dword [esp + 0x101c]
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.100d4230
add esp, 0xc
xor al, al
mov ecx, dword [esp + 0x101c]
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x100e94aa
push 0xa
call fcn.100d4230
mov ecx, dword [esp + 0x1024]
add esp, 8
xor al, al
call fcn.100d579b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc