Function at 0x43dbf0
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2234
call fcn.0044c3f0
mov eax, dword [0x45a220]
xor eax, esp
mov dword [esp + 0x2230], eax
mov ecx, dword [esp + 0x223c]
push ebx
mov ebx, dword [esp + 0x223c]
push ebp
cmp dword [ecx + 0x14], 0
lea edx, [ecx + 0x18]
push esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], edx
je 0x43dc35
mov esi, 2
jmp 0x43dc42
mov eax, dword [edx]
mov dword [esp + 0x1c], edx
mov esi, dword [eax*4 + 0x453c94]
mov ecx, dword [ecx + 0x54]
xor ebp, ebp
push edi
mov edi, dword [esp + 0x2250]
mov dword [esp + 0x28], 0
lea eax, [ecx - 1]
cmp eax, 1
ja 0x43dc74
push dword [ecx*4 + 0x45a178]
push str.cannot_read_on_a_File_opened_in__s_mode
push ebx
call sym.luart_static.exe_luaL_error
add esp, 0xc
lea eax, [esp + 0x30]
push eax
push ebx
call sym.luart_static.exe_luaL_buffinit
mov eax, dword [esp + 0x18]
add esp, 8
cmp dword [eax + 0x14], ebp
je 0x43def2
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push ebx
mov dword [esp + 0x30], eax
call fcn.0042a100
push dword [sym.luart_static.exe_TFile]
push 0xffffffffffffffff
push ebx
call sym.luart_static.exe_lua_toself
push 0xfffffffffffffffe
push ebx
mov esi, dword [eax + 4]
call sym.luart_static.exe_lua_settop
add esp, 0x18
cmp word [0x45a4e0], bp
jne 0x43dd7e
cmp dword [esp + 0x2254], ebp
je 0x43dd7e
mov ebp, dword [esp + 0x10]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
push 0x20000
push dword [ebp + 4]
call esi
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
add esp, 4
push eax
call edi
push dword [ebp + 4]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x24c]
push 0x1000
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetws]
add esp, 0x14
test eax, eax
je 0x43dd65
lea ecx, [esp + 0x240]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x43dd22
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 - 2]
push eax
lea eax, [esp + 0x244]
push eax
lea eax, [esp + 0x38]
push eax
call sym.luart_static.exe_luaL_addlstring
add esp, 0xc
push dword [esp + 0x1c]
push dword [ebp + 4]
call esi
add esp, 4
push eax
call edi
add esp, 8
jmp 0x43dff8
push 0x44e8c9
push ebx
call sym.luart_static.exe_lua_pushstring
push ebx
call sym.luart_static.exe_lua_error
add esp, 0xc
jmp 0x43dff8
push 0x20000
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
mov ebp, dword [esp + 0x18]
add esp, 8
mov dword [esp + 0x24], eax
lea eax, [esp + 0x1c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov ecx, dword [esp + 0x1c]
neg eax
sbb eax, eax
and ecx, 0xfffffff8
push ecx
push dword [ebp + 0xc]
inc eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
nop word [eax + eax]
cmp dword [esp + 0x10], 0
mov eax, dword [ebp + 0xc]
je 0x43ddf1
push 0
lea ecx, [esp + 0x2c]
push ecx
push 2
lea ecx, [esp + 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x43de06
push 0
lea ecx, [esp + 0x2c]
push ecx
push 1
lea ecx, [esp + 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
cmp dword [esp + 0x2254], 0
mov eax, dword [esp + 0x14]
je 0x43de1e
cmp ax, 0xd
je 0x43dec7
cmp ax, 3
jne 0x43de3c
push 0x453fb0
push ebx
call sym.luart_static.exe_lua_pushstring
push ebx
call sym.luart_static.exe_lua_error
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp dword [esp + 0x10], 0
jne 0x43de9c
cmp ax, 8
jne 0x43de7a
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x43de7a
sub ecx, 2
inc edi
cmp word [0x45a4e0], 0
mov dword [esp + 0x38], ecx
je 0x43de72
push esi
push 0x453fb4
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputws]
add esp, 8
mov eax, dword [ebp + 0xc]
jmp 0x43ddf1
mov cx, word [0x45a4e0]
test cx, cx
je 0x43de8b
movzx eax, cx
jmp 0x43de91
cmp ax, 0x1f
jbe 0x43de9c
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
add esp, 8
push 2
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x38]
push eax
call sym.luart_static.exe_luaL_addlstring
add esp, 0xc
cmp dword [esp + 0x2254], 0
jne 0x43ddd0
sub edi, 1
jne 0x43ddd0
push dword [esp + 0x1c]
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push dword [esp + 0x24]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
add esp, 8
jmp 0x43dff8
mov eax, dword [eax + 4]
test eax, eax
je 0x43e031
push eax
push 1
lea eax, [esp + 0x20]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
test eax, eax
je 0x43dff4
nop word [eax + eax]
mov eax, dword [esp + 0x20]
mov ebx, dword [eax]
mov eax, dword [esp + 0x18]
cmp ebx, 1
jne 0x43df7b
movzx ecx, al
mov edx, 0xe5000000
shr ecx, 3
and ecx, 0x1e
shr edx, cl
and edx, 3
lea ecx, [edx + 1]
mov dword [esp + 0x24], ecx
cmp ecx, 1
jbe 0x43df7b
mov eax, dword [esp + 0x10]
push dword [eax + 4]
lea eax, [esp + 0x1d]
push 1
push edx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push dword [esp + 0x34]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x48]
push eax
call sym.luart_static.exe_luaL_addlstring
add esp, 0x1c
jmp 0x43dfd0
cmp esi, 2
jne 0x43df8b
cmp ax, 0xa
je 0x43df94
movzx ebp, ax
jmp 0x43dfb8
cmp esi, 1
jne 0x43dfb5
cmp al, 0xa
jne 0x43dfb5
test ebx, ebx
je 0x43dfa1
cmp ebp, 0xd
jne 0x43dfa1
sub dword [esp + 0x38], esi
cmp dword [esp + 0x2254], 0
jne 0x43dff0
cmp esi, 2
jne 0x43dfb5
movzx ebp, ax
jmp 0x43dfb8
movsx ebp, al
push esi
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x38]
push eax
call sym.luart_static.exe_luaL_addlstring
add esp, 0xc
sub edi, 1
je 0x43dff0
mov eax, dword [esp + 0x10]
push dword [eax + 4]
lea eax, [esp + 0x1c]
push 1
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
test eax, eax
jne 0x43df20
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0x30]
push eax
call sym.luart_static.exe_luaL_pushresult
add esp, 4
cmp dword [esp + 0x38], 0
pop edi
jne 0x43e041
cmp dword [esp + 0x2250], 0
jne 0x43e041
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2230]
xor ecx, esp
call fcn.0044bf41
add esp, 0x2234
ret
push str.could_not_read__File_is_not_open
push ebx
call sym.luart_static.exe_luaL_error
add esp, 8
jmp 0x43dff4
mov eax, dword [esp + 0x1c]
cmp dword [eax], 2
je 0x43e050
cmp dword [ebp + 0x14], 0
je 0x43e074
lea eax, [esp + 0x224c]
push eax
push 0xffffffffffffffff
push ebx
call sym.luart_static.exe_lua_tolstring
mov ecx, dword [esp + 0x2258]
shr ecx, 1
push ecx
push eax
push ebx
call sym.luart_static.exe_lua_pushlwstring
add esp, 0x18
mov ecx, dword [esp + 0x223c]
mov eax, 1
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044bf41
add esp, 0x2234
ret