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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x290
mov eax, dword [0x111027c]
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 [0x111024c]
cmp eax, 0x111024c
je 0x109cd8a
test byte [eax + 0x1c], 4
je 0x109cd8a
cmp byte [eax + 0x19], 4
jb 0x109cd8a
push 0x100ab50
push 0x7a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101894a
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 0x109ce36
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109cdf7
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x109d081
test byte [eax + 0x1c], 4
je 0x109d059
cmp byte [eax + 0x19], 2
jb 0x109d059
push ebx
push esi
push 0x100ab50
push 0x7b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01048c37
jmp 0x109d054
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 0x109ce9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109ce66
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x109d048
test byte [eax + 0x1c], 4
je 0x109d048
cmp byte [eax + 0x19], 2
jb 0x109d048
push ebx
push esi
push 0x100ab50
push 0x7c
jmp 0x109d03d
push ebx
push ebx
mov esi, 0x1e00
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
je 0x109cefa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109cec1
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x109d048
test byte [eax + 0x1c], 4
je 0x109d048
cmp byte [eax + 0x19], 2
jb 0x109d048
push ebx
push dword [ebp - 0x28c]
push 0x100ab50
push 0x7d
jmp 0x109d03d
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 0x109cf6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109cf32
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x109d048
test byte [eax + 0x1c], 4
je 0x109d048
cmp byte [eax + 0x19], 2
jb 0x109d048
push ebx
push dword [ebp - 0x28c]
push 0x100ab50
push 0x7e
jmp 0x109d03d
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 0x109cfda
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109cfa8
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x109d048
test byte [eax + 0x1c], 4
je 0x109d048
cmp byte [eax + 0x19], 2
jb 0x109d048
push ebx
push dword [ebp - 0x28c]
push 0x100ab50
push 0x7f
jmp 0x109d03d
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 0x109d048
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x109d012
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x109d048
test byte [eax + 0x1c], 4
je 0x109d048
cmp byte [eax + 0x19], 2
jb 0x109d048
push ebx
push dword [ebp - 0x28c]
push 0x100ab50
push 0x80
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01048c37
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x109d081
test byte [eax + 0x1c], 4
je 0x109d081
cmp byte [eax + 0x19], 4
jb 0x109d081
push 0x100ab50
push 0x81
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101894a
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0106f798
leave
ret 4