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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5e4
mov dword [ebp - 0x110], 0x221c
and dword [ebp - 0x5e4], 0
push dword [ebp + 8]
call fcn.1000715e
pop ecx
push dword [ebp + 0xc]
call fcn.1000715e
pop ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.MSVCRT.dll_strcmp
pop ecx
pop ecx
test eax, eax
jne 0x10001ba5
xor eax, eax
jmp 0x10001e03
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1dc], eax
cmp dword [ebp - 0x1dc], 0xffffffff
jne 0x10001c00
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1dc], eax
cmp dword [ebp - 0x1dc], 0xffffffff
jne 0x10001c00
xor eax, eax
jmp 0x10001e03
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0xffffffff
jne 0x10001c3d
push dword [ebp - 0x1dc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x10001e03
and dword [ebp - 0x13c], 0
push dword [ebp + 8]
call fcn.10001b23
pop ecx
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x14
jge 0x10001c72
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1dc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x10001e03
mov eax, dword [ebp - 4]
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
pop ecx
mov dword [ebp - 0x5e0], eax
cmp dword [ebp - 0x5e0], 0
jne 0x10001c94
xor eax, eax
jmp 0x10001e03
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push dword [ebp - 0x5e0]
push dword [ebp - 0x1dc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
je 0x10001cd6
push dword [ebp - 0x1dc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x10001e03
push 0
lea eax, [ebp - 0x1cc]
push eax
push dword [ebp - 4]
push dword [ebp - 0x5e0]
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x1cc]
jne 0x10001d01
jmp 0x10001d08
xor eax, eax
jmp 0x10001e03
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x2710
idiv ecx
mov dword [ebp - 0x134], edx
and dword [ebp - 0x1c8], 0
jmp 0x10001d32
mov eax, dword [ebp - 0x1c8]
inc eax
mov dword [ebp - 0x1c8], eax
mov eax, dword [ebp - 0x1c8]
cmp eax, dword [ebp - 0x134]
jae 0x10001d74
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x1869f
idiv ecx
mov dword [ebp - 0x1d4], edx
push 0
lea eax, [ebp - 0x1cc]
push eax
push 4
lea eax, [ebp - 0x1d4]
push eax
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10001d25
push 0
lea eax, [ebp - 0x1cc]
push eax
push 4
lea eax, [ebp - 0x5e4]
push eax
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x1cc]
push eax
push 4
push 0x1000a024
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x1cc]
push eax
push 4
push 0x1000a020
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x1cc]
push eax
push 4
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x1dc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop eax
leave
ret