Function at 0x10010ff0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1034
call fcn.1002a660
mov eax, dword [0x10030004]
xor eax, esp
mov dword [esp + 0x1030], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
push ebx
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0xc]
sub edi, dword [eax]
sub edi, 0x10
sar edi, 4
dec edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
add esp, 4
test edi, edi
jne 0x1001109a
push 1
mov edx, ebx
mov ecx, esi
call fcn.10010e60
mov edi, dword [ebp + 8]
add esp, 4
mov ebx, eax
inc edi
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
je 0x100112f7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [eax]
mov eax, dword [esi + 0xc]
push ebx
mov dword [eax + 8], 0
add dword [esi + 0xc], 0x10
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
test eax, eax
jne 0x10011298
mov eax, dword [esi + 0xc]
mov dword [eax + 8], 0
jmp 0x100112b0
lea eax, [edi + 0x14]
push eax
push esi
call sym.lua53.dll_lua_checkstack
add esp, 8
test eax, eax
je 0x10011323
mov edi, dword [ebp + 8]
mov ebx, 1
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], edi
nop
dec eax
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x1001104e
push edi
push esi
call sym.lua53.dll_lua_type
add esp, 8
cmp eax, 3
jne 0x100111b0
lea eax, [esp + 0x1c]
push eax
push edi
push esi
call sym.lua53.dll_lua_tointegerx
add esp, 0xc
mov ebx, eax
cmp dword [esp + 0x1c], 0
je 0x10011333
test ebx, ebx
jne 0x10011157
mov ebx, dword [esp + 0x10]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
add esp, 4
mov dword [esp + 0x14], eax
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ungetc]
add esp, 8
mov edx, 0x1002b22c
mov ecx, esi
call fcn.1001de30
mov ecx, dword [esi + 0xc]
mov dword [ecx], eax
movzx eax, byte [eax + 4]
or eax, 0x40
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x10]
add dword [esi + 0xc], 0x10
cmp dword [eax + 0xc], 0
jle 0x10011148
mov ecx, esi
call fcn.1000fd40
xor ebx, ebx
cmp dword [esp + 0x14], 0xffffffff
setne bl
jmp 0x10011282
lea eax, [esp + 0x38]
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push ebx
push eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0x1000
call sym.lua53.dll_luaL_prepbuffsize
push dword [esp + 0x18]
push ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, eax
lea eax, [esp + 0x40]
add dword [esp + 0x48], edi
push eax
call sym.lua53.dll_luaL_pushresult
xor eax, eax
add esp, 0x1c
cmp eax, edi
mov edi, dword [esp + 0x14]
sbb ebx, ebx
neg ebx
jmp 0x10011282
push 0
push edi
push esi
call sym.lua53.dll_lua_tolstring
add esp, 0xc
test eax, eax
je 0x10011348
mov cl, byte [eax]
cmp cl, 0x2a
jne 0x100111ce
mov cl, byte [eax + 1]
movsx eax, cl
add eax, 0xffffffb4
cmp eax, 0x22
ja case.0x100111e4.77
movzx eax, byte [eax + 0x10011368]
jmp dword [eax*4 + 0x10011354]
mov edx, dword [esp + 0x10]
mov ecx, esi
call fcn.10010ae0
mov ebx, eax
jmp 0x10011282
mov edx, dword [esp + 0x10]
mov ecx, esi
push 1
call fcn.10010e60
mov ebx, eax
jmp 0x1001127f
mov edx, dword [esp + 0x10]
mov ecx, esi
push 0
call fcn.10010e60
mov ebx, eax
jmp 0x1001127f
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x38]
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0x1000
nop
lea eax, [esp + 0x28]
push 0x1000
push eax
call sym.lua53.dll_luaL_prepbuffsize
push edi
push 0x1000
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add dword [esp + 0x48], eax
add esp, 0x18
cmp eax, 0x1000
je 0x10011240
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x28]
push eax
call sym.lua53.dll_luaL_pushresult
mov ebx, 1
add esp, 4
mov eax, dword [esp + 0x18]
inc edi
mov dword [esp + 0x14], edi
test eax, eax
jne 0x100110c0
jmp 0x1001104e
mov edx, eax
mov ecx, esi
call fcn.1001de30
mov ecx, dword [esi + 0xc]
mov dword [ecx], eax
movzx eax, byte [eax + 4]
or eax, 0x40
mov dword [ecx + 8], eax
mov ecx, dword [esi + 0x10]
add dword [esi + 0xc], 0x10
mov edi, dword [esi + 0xc]
cmp dword [ecx + 0xc], 0
jle 0x100112ca
mov ecx, esi
call fcn.1000fd40
mov edi, dword [esi + 0xc]
mov eax, ebx
mov dword [edi + 8], 0x13
cdq
mov dword [edi], eax
mov eax, 3
mov dword [edi + 4], edx
add dword [esi + 0xc], 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1030]
xor ecx, esp
call fcn.10029730
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x10011309
add dword [esi + 0xc], 0xfffffff0
mov eax, dword [esi + 0xc]
mov dword [eax + 8], ebx
add dword [esi + 0xc], 0x10
sub edi, dword [ebp + 8]
mov ecx, dword [esp + 0x103c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10029730
mov esp, ebp
pop ebp
ret
push str.too_many_arguments
push str.stack_overflow___s_
push esi
call sym.lua53.dll_luaL_error
mov edx, edi
mov ecx, esi
call fcn.100051f0
push str.invalid_format
push edi
push esi
call sym.lua53.dll_luaL_argerror
push 4
mov edx, edi
mov ecx, esi
call fcn.100049c0
nop
push cs
adc al, byte [ecx]
adc byte [edi], bl
adc al, byte [ecx]
adc ch, bh
adc dword [ecx], eax
adc bl, ch
adc dword [ecx], eax
adc byte [ebx + edx], bh
add dword [eax], edx
add byte [esp + eax], al
add al, 4
add al, 4
add al, 4
add al, 4
add al, 4
add al, 4
add al, 4
add al, 4
add al, 4
add dword [esp + eax], eax
add al, 4
add al, 4
add al, 4
add al, 4
add al, byte [ebx + eax]
int3