Function at 0x41c7b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1024
call fcn.00479d20
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
push esi
mov dword [esp + 0x14], edi
call dword [sym.imp.lua51.dll_lua_gettop]
add esp, 4
lea ebx, [eax + 1]
test edi, edi
jne 0x41c86a
push 6
push str.stdin
push esi
call dword [sym.imp.lua51.dll_lua_pushlstring]
push edi
push 0xffffffffffffffff
push esi
call dword [sym.imp.lua51.dll_lua_tolstring]
push edi
call fcn.0047dd2b
add esp, 0x1c
mov dword [esp + 0x2c], eax
lea edx, [esp + 0xc]
lea ecx, [esp + 0x28]
call fcn.0041c720
test eax, eax
je 0x41c823
mov eax, dword [esp + 0x28]
mov byte [esp + eax + 0x30], 0xa
inc dword [esp + 0x28]
mov ecx, dword [esp + 0xc]
cmp ecx, 0x1b
jne 0x41c8bb
test edi, edi
je 0x41c8bb
push dword [esp + 0x2c]
lea eax, [esp + 0x30]
push 0x4babd8
push edi
push eax
call fcn.00482d5d
add esp, 0x10
test eax, eax
je 0x41c8aa
push ebx
mov edx, str.reopen
mov ecx, esi
call fcn.0041c6a0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 0x4bae00
push esi
call dword [sym.imp.lua51.dll_lua_pushfstring]
push 0x40
push 0x4bae04
push edi
call fcn.00481b07
add esp, 0x18
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x41c805
push ebx
mov edx, str.open
mov ecx, esi
call fcn.0041c6a0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0xc]
lea ecx, [esp + 0x28]
call fcn.0041c720
mov ecx, dword [esp + 0xc]
cmp ecx, 0xffffffff
je 0x41c8cc
mov eax, dword [esp + 0x28]
mov byte [esp + eax + 0x30], cl
inc dword [esp + 0x28]
push 0
push 0xffffffffffffffff
push esi
call dword [sym.imp.lua51.dll_lua_tolstring]
mov dword [esp + 0x18], eax
add esp, 0xc
lea eax, [esp + 0x28]
mov dword [esp + 0x14], 0x41c640
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 0x41c918
mov dword [esp + 0x28], 0
jmp 0x41c944
push dword [esp + 0x2c]
call fcn.00482649
add esp, 4
test eax, eax
jne 0x41c9fe
push dword [esp + 0x2c]
lea eax, [esp + 0x34]
push 0x1000
push 1
push eax
call fcn.004821aa
add esp, 0x10
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x20], ecx
test eax, eax
je 0x41c9fe
cmp byte [ecx], 0x1b
jne 0x41c9fe
mov edi, dword [ebp + 8]
test edi, edi
je 0x41c994
push 0x62
push edi
call fcn.0047a370
add esp, 8
test eax, eax
jne 0x41c994
mov eax, dword [sym.imp.lua51.dll_lua_pushfstring]
push edi
push str.binary
push str.attempt_to_load_a__s_chunk__mode_is__s_
push esi
call eax
add esp, 0x10
mov edi, 3
jmp 0x41c996
xor edi, edi
test edi, edi
jne 0x41c9b4
push dword [esp + 0xc]
lea eax, [esp + 0x18]
push eax
push 0x41c600
push esi
call dword [sym.imp.lua51.dll_lua_load]
mov edi, eax
add esp, 0x10
push dword [esp + 0x2c]
call fcn.00482675
add esp, 4
mov dword [esp + 0xc], eax
cmp dword [esp + 0x10], 0
je 0x41c9db
push dword [esp + 0x2c]
call fcn.00481c7e
mov eax, dword [esp + 0x10]
add esp, 4
push ebx
push esi
test eax, eax
je 0x41ca2e
call dword [sym.imp.lua51.dll_lua_settop]
push ebx
mov edx, str.read
mov ecx, esi
call fcn.0041c6a0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
test edi, edi
je 0x41c99a
push 0x74
push edi
call fcn.0047a370
add esp, 8
test eax, eax
jne 0x41c99a
mov eax, dword [sym.imp.lua51.dll_lua_pushfstring]
push edi
push str.text
push str.attempt_to_load_a__s_chunk__mode_is__s_
push esi
call eax
mov edi, 3
jmp 0x41c9b1
call dword [sym.imp.lua51.dll_lua_remove]
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret