Function at 0x10006070
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x1034
call fcn.1000a120
mov eax, dword [0x1000e020]
xor eax, esp
mov dword [esp + 0x1030], eax
mov eax, dword [esp + 0x103c]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1048]
xor ebp, ebp
push ebp
push 0x80
push 3
push ebp
push 3
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1064]
push connect
push eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
mov dword [esp + 0x10], ebx
cmp ebx, 0xffffffff
je 0x1000627a
lea eax, [esp + 0x38]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push 0
lea eax, [esp + 0x24]
push eax
push 0x1000
lea eax, [esp + 0x4c]
push eax
push ebx
call esi
test eax, eax
je 0x1000627a
mov ebx, dword [esp + 0x24]
add ebx, 0xf0
nop dword [eax]
mov esi, dword [esp + 0x20]
add ebp, esi
mov ecx, dword [ebx + 0x14]
mov eax, ecx
mov dword [esp + 0x1c], ebp
mov ebp, dword [ebx + 0x10]
sub eax, ebp
mov dword [esp + 0x14], ecx
cmp esi, eax
ja 0x10006156
lea eax, [esi + ebp]
mov dword [ebx + 0x10], eax
mov eax, ebx
cmp ecx, 0x10
jb 0x1000613b
mov eax, dword [ebx]
lea edi, [eax + ebp]
push esi
lea eax, [esp + 0x44]
push eax
push edi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [edi + esi], 0
jmp 0x10006239
mov eax, bind
sub eax, ebp
cmp eax, esi
jb 0x100062de
lea edi, [esi + ebp]
or edi, 0xf
cmp edi, 0x7fffffff
jbe 0x1000617a
mov edi, bind
jmp 0x10006198
mov edx, ecx
mov eax, bind
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x10006190
mov edi, bind
jmp 0x10006198
lea eax, [edx + ecx]
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
mov ecx, ebx
push eax
call fcn.10004490
cmp dword [esp + 0x14], 0x10
lea ecx, [esi + ebp]
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x10], ecx
lea edi, [eax + ebp]
mov dword [esp + 0x18], eax
lea ecx, [edi + esi]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ecx
push ebp
jb 0x10006217
mov edi, dword [ebx]
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
push esi
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x3c]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x44]
add esp, 0x18
mov ecx, dword [esp + 0x14]
inc ecx
mov byte [eax], 0
cmp ecx, 0x1000
jb 0x1000620b
mov edx, dword [edi - 4]
add ecx, 0x23
sub edi, edx
lea eax, [edi - 4]
cmp eax, 0x1f
ja 0x100062a8
mov edi, edx
push ecx
push edi
call fcn.1000a0f8
add esp, 8
jmp 0x10006233
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
push esi
lea eax, [esp + 0x50]
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
lea eax, [edi + esi]
add esp, 0x18
mov byte [eax], 0
mov eax, dword [esp + 0x18]
mov dword [ebx], eax
xor eax, eax
cmp eax, dword [esp + 0x3c]
jg 0x100062ae
mov ebp, dword [esp + 0x1c]
jl 0x1000624d
cmp ebp, dword [esp + 0x38]
jae 0x100062ae
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x20]
push 0
push eax
push 0x1000
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x20]
call esi
test eax, eax
jne 0x10006110
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
call dword [sym.imp.lua54.dll_luaL_getlasterror]
push 0
push 0xffffffffffffffff
push edi
call dword [sym.imp.lua54.dll_lua_tolstring]
push eax
push str.cannot_open_File_:__s
push edi
call dword [sym.imp.lua54.dll_luaL_error]
add esp, 0x20
jmp 0x100060db
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x34]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [esp + 0x1044]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1000a106
add esp, 0x1034
ret
call fcn.10004470
int3