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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
call fcn.1011b6d0
mov edi, dword [esp + 0x48]
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
test eax, eax
je 0x100fb422
test ebx, ebx
jne 0x100fb2f8
xor ecx, ecx
jmp 0x100fb2fa
mov ecx, dword [ebx]
xor edx, edx
mov eax, edi
or eax, edx
jne 0x100fb30c
mov eax, dword [esp + 0x40]
mul dword [esp + 0x44]
mov edi, eax
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], 0
test ecx, ecx
je 0x100fb357
test byte [ecx + 0x80], 4
je 0x100fb357
push edi
mov edi, dword [esp + 0x50]
mov ecx, str.write
push edi
push dword [ebp + 0x1c]
cmp esi, 1
mov eax, str.read
cmovne eax, ecx
push eax
push str.fileops:__s__s:__lu_bytes_at_offset__lu
push ebx
call fcn.100d0b10
add esp, 0x18
jmp 0x100fb35b
mov edi, dword [esp + 0x4c]
test ebx, ebx
je 0x100fb391
mov eax, dword [ebx + 0x8c]
test eax, eax
je 0x100fb391
mov eax, dword [eax + 0x18]
cmp dword [eax + 4], 0
je 0x100fb391
mov eax, dword [ebx]
test dword [eax + 0x114], 0x100
jne 0x100fb391
push ebx
call fcn.100d1120
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, esi
sub eax, 1
je 0x100fb3eb
sub eax, 1
jne 0x100fb40a
call fcn.1011b5d0
test eax, eax
jne 0x100fb3c5
inc dword [ebp + 0x34]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
push edi
push dword [esp + 0x5c]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100fb40a
mov edi, dword [esp + 0x48]
mov eax, dword [ebp + 8]
test eax, eax
je 0x100fb428
push eax
push ebx
call fcn.100dbf50
add esp, 8
test eax, eax
je 0x100fb428
pop edi
pop esi
pop ebp
mov eax, 0xffff8702
pop ebx
add esp, 0x20
ret
inc dword [ebp + 0x30]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
push edi
push dword [esp + 0x5c]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100fb3c5
mov ecx, dword [esp + 0x14]
cmp ecx, edi
jne 0x100fb3c5
mov eax, dword [esp + 0x54]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
xor eax, eax
pop ebx
add esp, 0x20
ret
mov ebp, dword [esp + 0x3c]
jmp 0x100fb3c9
push edi
push dword [esp + 0x48]
push dword [esp + 0x48]
push ebp
push ebx
call fcn.100fb8f0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x100fb5d4
sub esi, 1
je 0x100fb48d
sub esi, 1
jne 0x100fb5d4
call fcn.1011b5d0
test eax, eax
je 0x100fb470
push ebp
push ebx
call fcn.10167a60
mov edi, eax
add esp, 8
test edi, edi
jne 0x100fb5d4
push dword [esp + 0x54]
push dword [esp + 0x50]
push dword [esp + 0x58]
push ebp
push ebx
call fcn.100fb600
add esp, 0x14
mov edi, eax
jmp 0x100fb5d4
mov ecx, dword [esp + 0x3c]
test ebx, ebx
jne 0x100fb49c
inc dword [ecx + 0x30]
xor edi, edi
jmp 0x100fb4c9
mov eax, dword [ebx]
xor edi, edi
inc dword [ecx + 0x30]
test eax, eax
je 0x100fb4c9
test byte [eax + 0x80], 4
je 0x100fb4c9
push dword [esp + 0x4c]
push dword [ecx + 0x1c]
push str.fileops:_read__s:__lu_bytes
push ebx
call fcn.100d0b10
mov ecx, dword [esp + 0x4c]
add esp, 0x10
mov edx, dword [esp + 0x50]
xor ebp, ebp
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x4c], ebp
jbe 0x100fb5a1
test ebx, ebx
je 0x100fb50a
mov eax, dword [ebx + 0x8c]
test eax, eax
je 0x100fb50a
mov eax, dword [eax + 0x18]
cmp dword [eax + 4], 0
je 0x100fb50a
mov eax, dword [ebx]
test dword [eax + 0x114], 0x100
je 0x100fb596
mov ebp, dword [esp + 0x4c]
xor edi, edi
sub ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
lea esi, [edi + 0x64]
nop dword [eax + eax]
push 0
lea eax, [esp + 0x1c]
push eax
push ebp
push ebx
push dword [ecx + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100fb563
call fcn.100f3810
mov edi, eax
push edi
call fcn.100f3830
add esp, 4
cmp eax, 0xb
je 0x100fb55a
cmp eax, 0x10
je 0x100fb55a
cmp eax, 4
je 0x100fb55a
cmp eax, 5
jne 0x100fb563
mov ecx, dword [esp + 0x3c]
dec esi
test esi, esi
jg 0x100fb520
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
test eax, eax
je 0x100fb5a1
test edi, edi
jne 0x100fb5a1
add ebp, eax
add edx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
cmp ebp, dword [esp + 0x4c]
jae 0x100fb5a1
mov ecx, dword [esp + 0x3c]
jmp 0x100fb4e1
push ebx
call fcn.100d1120
add esp, 4
jmp 0x100fb5ce
mov eax, dword [esp + 0x54]
mov ecx, edx
sub ecx, dword [esp + 0x50]
mov dword [eax], ecx
test edi, edi
je 0x100fb5d0
mov eax, dword [esp + 0x4c]
sub eax, ebp
push eax
push edx
push str.read:_0x_lx___lu
push edi
push ebx
call fcn.100d0ec0
push edi
call fcn.100f3830
add esp, 0x18
mov edi, eax
mov ebp, dword [esp + 0x3c]
mov eax, dword [ebp + 8]
test eax, eax
je 0x100fb5ef
push eax
push ebx
call fcn.100dc5b0
add esp, 8
mov ecx, 0xffff8702
test eax, eax
cmovne edi, ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret