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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x290
mov eax, dword [0x111127c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x28c], esi
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109ce9b
test byte [eax + 0x1c], 4
je 0x109ce9b
cmp byte [eax + 0x19], 4
jb 0x109ce9b
push 0x100ab40
push 0x7a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
xor ebx, ebx
push 0x1ff
lea eax, [ebp - 0x283]
push ebx
push eax
mov dword [ebp - 0x290], ebx
mov byte [ebp - 0x284], bl
call sub.msvcrt.dll_memset
push 0x80
lea eax, [ebp - 0x84]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
push ebx
push 0x2000080
push 3
push ebx
push 7
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x288], edi
cmp edi, 0xffffffff
jne 0x109cf47
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109cf08
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109d192
test byte [eax + 0x1c], 4
je 0x109d16a
cmp byte [eax + 0x19], 2
jb 0x109d16a
push ebx
push esi
push 0x100ab40
push 0x7b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
jmp 0x109d165
push ebx
lea eax, [ebp - 0x290]
push eax
push ebx
push ebx
push ebx
push ebx
push 0x90020
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x109cfab
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109cf77
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109d159
test byte [eax + 0x1c], 4
je 0x109d159
cmp byte [eax + 0x19], 2
jb 0x109d159
push ebx
push esi
push 0x100ab40
push 0x7c
jmp 0x109d14e
push ebx
push ebx
mov esi, 0x1e00
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
je 0x109d00b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109cfd2
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109d159
test byte [eax + 0x1c], 4
je 0x109d159
cmp byte [eax + 0x19], 2
jb 0x109d159
push ebx
push dword [ebp - 0x28c]
push 0x100ab40
push 0x7d
jmp 0x109d14e
push ebx
lea eax, [ebp - 0x290]
push eax
push 0x200
lea eax, [ebp - 0x284]
push eax
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x109d07c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109d043
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109d159
test byte [eax + 0x1c], 4
je 0x109d159
cmp byte [eax + 0x19], 2
jb 0x109d159
push ebx
push dword [ebp - 0x28c]
push 0x100ab40
push 0x7e
jmp 0x109d14e
push 0x20
pop ecx
push ebx
lea esi, [ebp - 0x84]
lea edi, [ebp - 0x284]
rep movsd dword es:[edi], dword [esi]
push ebx
mov esi, 0x1e00
push esi
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
je 0x109d0eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109d0b9
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109d159
test byte [eax + 0x1c], 4
je 0x109d159
cmp byte [eax + 0x19], 2
jb 0x109d159
push ebx
push dword [ebp - 0x28c]
push 0x100ab40
push 0x7f
jmp 0x109d14e
push ebx
lea eax, [ebp - 0x290]
push eax
push 0x200
lea eax, [ebp - 0x284]
push eax
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x109d159
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109d123
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109d159
test byte [eax + 0x1c], 4
je 0x109d159
cmp byte [eax + 0x19], 2
jb 0x109d159
push ebx
push dword [ebp - 0x28c]
push 0x100ab40
push 0x80
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109d192
test byte [eax + 0x1c], 4
je 0x109d192
cmp byte [eax + 0x19], 4
jb 0x109d192
push 0x100ab40
push 0x81
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0106f5f8
leave
ret 4