Function at 0x42c570
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x21c
mov eax, dword [0x470d00]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
push ebp
mov ebp, dword [esp + 0x22c]
push esi
push edi
mov edi, dword [esp + 0x230]
push edi
call sym.wluart.exe_lua_gettop
push ebp
lea ebx, [eax - 1]
mov dword [esp + 0x1c], ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
add esp, 8
test ebx, ebx
jne 0x42c5eb
push 1
push ebp
push edi
call fcn.0042ccb0
mov esi, dword [esp + 0x244]
add esp, 0xc
mov ebx, eax
inc esi
push ebp
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
je 0x42c786
push 0
push 0
push edi
call sym.wluart.exe_luaL_fileresult
add esp, 0xc
jmp 0x42c7a4
push str.too_many_arguments
lea eax, [ebx + 0x14]
push eax
push edi
call sym.wluart.exe_luaL_checkstack
mov esi, dword [esp + 0x244]
add esp, 0xc
mov eax, dword [esp + 0x14]
mov ebx, 1
mov dword [esp + 0x10], esi
dec eax
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x42c5c7
push esi
push edi
call sym.wluart.exe_lua_type
add esp, 8
cmp eax, 3
jne 0x42c6b2
push esi
push edi
call sym.wluart.exe_luaL_checkinteger
mov esi, eax
add esp, 8
test esi, esi
jne 0x42c66d
push ebp
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov esi, eax
push ebp
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ungetc]
push 0x461bd9
push edi
call sym.wluart.exe_lua_pushstring
xor ebx, ebx
add esp, 0x14
cmp esi, 0xffffffff
mov esi, dword [esp + 0x10]
setne bl
jmp 0x42c75f
lea eax, [esp + 0x18]
push eax
push edi
call sym.wluart.exe_luaL_buffinit
lea eax, [esp + 0x20]
push esi
push eax
call sym.wluart.exe_luaL_prepbuffsize
push ebp
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov esi, eax
lea eax, [esp + 0x38]
add dword [esp + 0x40], esi
push eax
call sym.wluart.exe_luaL_pushresult
xor eax, eax
add esp, 0x24
cmp eax, esi
mov esi, dword [esp + 0x10]
sbb ebx, ebx
neg ebx
jmp 0x42c75f
push 0
push esi
push edi
call sym.wluart.exe_luaL_checklstring
add esp, 0xc
mov cl, byte [eax]
cmp cl, 0x2a
jne 0x42c6c8
mov cl, byte [eax + 1]
movsx eax, cl
add eax, 0xffffffb4
cmp eax, 0x22
ja case.0x42c6de.77
movzx eax, byte [eax + 0x42c7d4]
jmp dword [eax*4 + 0x42c7c0]
push ebp
push edi
call fcn.0042cdd0
add esp, 8
mov ebx, eax
jmp 0x42c75f
push 1
push ebp
push edi
call fcn.0042ccb0
add esp, 0xc
mov ebx, eax
jmp 0x42c75f
push 0
push ebp
push edi
call fcn.0042ccb0
add esp, 0xc
mov ebx, eax
jmp 0x42c75f
lea eax, [esp + 0x18]
push eax
push edi
call sym.wluart.exe_luaL_buffinit
add esp, 8
lea eax, [esp + 0x18]
push 0x200
push eax
call sym.wluart.exe_luaL_prepbuffsize
push ebp
push 0x200
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add dword [esp + 0x38], eax
add esp, 0x18
cmp eax, 0x200
je 0x42c721
lea eax, [esp + 0x18]
push eax
call sym.wluart.exe_luaL_pushresult
add esp, 4
mov ebx, 1
mov eax, dword [esp + 0x14]
inc esi
mov dword [esp + 0x10], esi
test eax, eax
jne 0x42c611
jmp 0x42c5c7
push str.invalid_format
push esi
push edi
call sym.wluart.exe_luaL_argerror
add esp, 0xc
jmp 0x42c7a4
test ebx, ebx
jne 0x42c79b
push 0xfffffffffffffffe
push edi
call sym.wluart.exe_lua_settop
push edi
call sym.wluart.exe_lua_pushnil
add esp, 0xc
sub esi, dword [esp + 0x238]
mov eax, esi
mov ecx, dword [esp + 0x228]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045f6d1
add esp, 0x21c
ret