Function at 0x42ddd0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x21c
mov eax, dword [0x475d80]
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_static.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
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0
test ebx, ebx
jne 0x42de57
push 1
push ebp
push edi
call fcn.0042e560
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 0x42dff5
push 0
push 0
push edi
call sym.wluart_static.exe_luaL_fileresult
add esp, 0xc
jmp 0x42e013
push str.too_many_arguments
lea eax, [ebx + 0x14]
push eax
push edi
call sym.wluart_static.exe_luaL_checkstack
mov esi, dword [esp + 0x244]
add esp, 0xc
mov eax, dword [esp + 0x14]
mov ebx, 1
mov dword [esp + 0x10], esi
nop dword [eax]
dec eax
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x42de33
push esi
push edi
call sym.wluart_static.exe_lua_type
add esp, 8
cmp eax, 3
jne 0x42df21
push esi
push edi
call sym.wluart_static.exe_luaL_checkinteger
mov esi, eax
add esp, 8
test esi, esi
jne 0x42dedc
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 0x465c19
push edi
call sym.wluart_static.exe_lua_pushstring
xor ebx, ebx
add esp, 0x14
cmp esi, 0xffffffff
mov esi, dword [esp + 0x10]
setne bl
jmp 0x42dfce
lea eax, [esp + 0x18]
push eax
push edi
call sym.wluart_static.exe_luaL_buffinit
lea eax, [esp + 0x20]
push esi
push eax
call sym.wluart_static.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_static.exe_luaL_pushresult
xor eax, eax
add esp, 0x24
cmp eax, esi
mov esi, dword [esp + 0x10]
sbb ebx, ebx
neg ebx
jmp 0x42dfce
push 0
push esi
push edi
call sym.wluart_static.exe_luaL_checklstring
add esp, 0xc
mov cl, byte [eax]
cmp cl, 0x2a
jne 0x42df37
mov cl, byte [eax + 1]
movsx eax, cl
add eax, 0xffffffb4
cmp eax, 0x22
ja case.0x42df4d.77
movzx eax, byte [eax + 0x42e040]
jmp dword [eax*4 + 0x42e02c]
push ebp
push edi
call fcn.0042e680
add esp, 8
mov ebx, eax
jmp 0x42dfce
push 1
push ebp
push edi
call fcn.0042e560
add esp, 0xc
mov ebx, eax
jmp 0x42dfce
push 0
push ebp
push edi
call fcn.0042e560
add esp, 0xc
mov ebx, eax
jmp 0x42dfce
lea eax, [esp + 0x18]
push eax
push edi
call sym.wluart_static.exe_luaL_buffinit
add esp, 8
lea eax, [esp + 0x18]
push 0x200
push eax
call sym.wluart_static.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 0x42df90
lea eax, [esp + 0x18]
push eax
call sym.wluart_static.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 0x42de80
jmp 0x42de33
push str.invalid_format
push esi
push edi
call sym.wluart_static.exe_luaL_argerror
add esp, 0xc
jmp 0x42e013
test ebx, ebx
jne 0x42e00a
push 0xfffffffffffffffe
push edi
call sym.wluart_static.exe_lua_settop
push edi
call sym.wluart_static.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.00463052
add esp, 0x21c
ret