Function at 0x101660e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x122c
call fcn.102ff0c0
mov eax, dword [0x1049b0c0]
xor eax, esp
mov dword [esp + 0x1228], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
push esi
mov ebx, edx
call fcn.10302a50
inc eax
add esp, 4
mov dword [esp + 0x10], eax
test ebx, ebx
jne 0x101661b8
push 6
push str.stdin
push esi
call fcn.10302fb0
push ebx
push 0xffffffffffffffff
push esi
call fcn.10303890
push ebx
call fcn.1035b988
add esp, 0x1c
mov dword [esp + 0x2c], eax
lea edx, [esp + 0xc]
lea ecx, [esp + 0x28]
call fcn.10166050
test eax, eax
je 0x1016615f
mov eax, dword [esp + 0x28]
mov byte [esp + eax + 0x30], 0xa
inc dword [esp + 0x28]
mov ecx, dword [esp + 0xc]
cmp ecx, 0x1b
jne 0x1016621a
test ebx, ebx
je 0x1016621a
push dword [esp + 0x2c]
lea eax, [esp + 0x30]
push 0x10464f30
push ebx
push eax
call fcn.1036b399
add esp, 0x10
test eax, eax
je 0x10166209
mov ebx, dword [esp + 0x10]
mov edx, str.reopen
push ebx
mov ecx, esi
call fcn.10165fc0
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1228]
xor ecx, esp
call fcn.102fe398
mov esp, ebp
pop ebp
ret
push ebx
push 0x10466400
push esi
call fcn.10302f20
push 0x40
push 0x10466404
push ebx
call fcn.1035dcb1
add esp, 0x18
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x10166141
mov ebx, dword [esp + 0x10]
mov edx, str.open
push ebx
mov ecx, esi
call fcn.10165fc0
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1228]
xor ecx, esp
call fcn.102fe398
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0xc]
lea ecx, [esp + 0x28]
call fcn.10166050
mov ecx, dword [esp + 0xc]
cmp ecx, 0xffffffff
je 0x1016622b
mov eax, dword [esp + 0x28]
mov byte [esp + eax + 0x30], cl
inc dword [esp + 0x28]
push 0
push 0xffffffffffffffff
push esi
call fcn.10303890
mov dword [esp + 0x18], eax
add esp, 0xc
lea eax, [esp + 0x28]
mov dword [esp + 0x14], 0x10165f60
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], 1
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
test eax, eax
jle 0x10166276
mov dword [esp + 0x28], 0
jmp 0x101662a2
push dword [esp + 0x2c]
call fcn.1036aeaa
add esp, 4
test eax, eax
jne 0x101663ba
push dword [esp + 0x2c]
lea eax, [esp + 0x34]
push 0x1000
push 1
push eax
call fcn.1035c477
add esp, 0x10
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x20], ecx
test eax, eax
je 0x101663ba
cmp byte [ecx], 0x1b
jne 0x101663ba
test edi, edi
je 0x101662ed
push 0x62
push edi
call fcn.1034c120
add esp, 8
test eax, eax
jne 0x101662ed
push edi
push str.binary
push str.attempt_to_load_a__s_chunk__mode_is__s_
push esi
call fcn.10302f20
add esp, 0x10
mov edi, 3
jmp 0x101662ef
xor edi, edi
test edi, edi
jne 0x1016630c
push dword [esp + 0xc]
lea eax, [esp + 0x18]
push eax
push 0x10165f20
push esi
call fcn.1030d960
mov edi, eax
add esp, 0x10
push dword [esp + 0x2c]
call fcn.1036aed6
add esp, 4
mov dword [esp + 0xc], eax
test ebx, ebx
je 0x10166330
push dword [esp + 0x2c]
call fcn.1035042f
mov eax, dword [esp + 0x10]
add esp, 4
mov ebx, dword [esp + 0x10]
push ebx
push esi
test eax, eax
je 0x101663f0
call fcn.10303720
push 0x200
lea eax, [esp + 0x103c]
push 0
push eax
call fcn.1034c920
call fcn.103690d0
push dword [eax]
lea eax, [esp + 0x1048]
push 0x200
push eax
call fcn.1036b22c
push 0
push ebx
push esi
call fcn.10303890
lea ecx, [esp + 0x105c]
inc eax
push ecx
push eax
push str.read
push str.cannot__s__s:__s
push esi
call fcn.10302f20
add esp, 0x40
push ebx
push esi
call fcn.10303300
mov eax, 6
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1228]
xor ecx, esp
call fcn.102fe398
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x101662f3
push 0x74
push edi
call fcn.1034c120
add esp, 8
test eax, eax
jne 0x101662f3
push edi
push str.text
push str.attempt_to_load_a__s_chunk__mode_is__s_
push esi
call fcn.10302f20
mov edi, 3
jmp 0x10166309
call fcn.10303300
mov ecx, dword [esp + 0x123c]
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.102fe398
mov esp, ebp
pop ebp
ret