joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14003f870
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rdi
mov eax, 0x2070
call fcn.14006dcc0
sub rsp, rax
mov rax, qword [0x1400888e8]
xor rax, rsp
mov qword [rsp + 0x2060], rax
xor ebp, ebp
mov rdi, rdx
mov rbx, rcx
test rcx, rcx
jne 0x14003f8a8
lea eax, [rcx - 1]
jmp 0x14003fa30
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x2000
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
lea rdx, [rsp + 0x20]
xor eax, eax
mov rcx, rdi
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x50], rax
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm0
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wstat64]
test eax, eax
je 0x14003f8ef
mov eax, 0xfffffffd
jmp 0x14003fa30
movzx ecx, word [rsp + 0x26]
mov qword [rsp + 0x20a0], rsi
test cl, cl
js 0x14003f907
or dword [rbx + 0x4e068], 1
mov eax, ecx
mov edx, 0xf000
shl eax, 0x10
and cx, dx
or eax, dword [rbx + 0x4e068]
mov edx, 0x4000
mov dword [rbx + 0x4e068], eax
cmp cx, dx
jne 0x14003f933
or eax, 0x10
mov dword [rbx + 0x4e068], eax
mov rax, qword [rsp + 0x48]
lea rdx, [0x140075134]
mov rcx, rdi
mov qword [rbx + 0x4e070], rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov rsi, rax
test rax, rax
jne 0x14003f95f
lea eax, [rsi - 0x10]
jmp 0x14003fa28
mov r9, rsi
lea rcx, [rsp + 0x60]
mov edx, 1
mov r8d, 0x2000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rdi, rax
test rax, rax
je 0x14003fa1d
mov ecx, dword [rbx + 0x98]
lea rdx, [rsp + 0x60]
add qword [rbx + 0x88], rdi
mov r8, rdi
call fcn.140035120
test byte [rbx + 0x70], 0xf
mov dword [rbx + 0x98], eax
jne 0x14003f9d5
mov rdx, qword [rbx + 0xa0]
lea r8, [rsp + 0x60]
mov rcx, qword [rbx + 0x60]
mov r9, rdi
call qword [rbx + 0x50]
cmp rax, rdi
jne 0x14003fa18
add qword [rbx + 0xa0], rdi
add qword [rbx + 0x90], rdi
jmp 0x14003f9f1
lea rcx, [rbx + 0xf0]
xor r9d, r9d
mov r8, rdi
lea rdx, [rsp + 0x60]
call fcn.14003a3a0
cmp eax, 1
ja 0x14003fa18
mov r9, rsi
lea rcx, [rsp + 0x60]
mov edx, 1
mov r8d, 0x2000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rdi, rax
test rax, rax
jne 0x14003f984
jmp 0x14003fa1d
mov ebp, 0xfffffff8
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, ebp
mov rsi, qword [rsp + 0x20a0]
mov rcx, qword [rsp + 0x2060]
xor rcx, rsp
call fcn.14006dc90
add rsp, 0x2070
pop rdi
pop rbp
pop rbx
ret
Function at 0x140043eb0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
lea r9, str.read
mov edx, 2
lea r8, str.read
mov rdi, rcx
call sym.wluart_static.exe_luaL_checkoption
mov rcx, rdi
movsxd rsi, eax
call sym.wluart_static.exe_lua_gettop
mov r8d, dword [sym.wluart_static.exe_TFile]
mov edx, 1
mov rcx, rdi
mov ebp, eax
call sym.wluart_static.exe_lua_toself
mov rbx, rax
cmp dword [rax + 0x24], 0
jne 0x14004401f
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140043f1c
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbx + 0x68]
lea rax, str.4Q_a_
mov rdx, qword [rax + rsi*8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov qword [rbx + 8], rax
test rax, rax
jne 0x140043f5a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
lea rdx, str.File_open_failed__s
mov rcx, rdi
mov r8, rax
call sym.wluart_static.exe_luaL_error
mov dword [rbx + 0x70], esi
cmp esi, 2
jge 0x140043f9e
mov rcx, qword [rbx + 8]
call sym.wluart_static.exe_detectBOM
mov dword [rbx + 0x28], eax
cmp ebp, 1
jne 0x140043f7c
test eax, eax
jne 0x140043fee
mov dword [rbx + 0x28], ebp
jmp 0x140043fee
cmp ebp, 3
jne 0x140043fee
lea r9, str.binary
mov edx, ebp
lea r8, str.binary
mov rcx, rdi
call sym.wluart_static.exe_luaL_checkoption
mov dword [rbx + 0x28], eax
jmp 0x140043fee
lea r9, str.binary
mov edx, 3
lea r8, str.utf8
mov rcx, rdi
call sym.wluart_static.exe_luaL_checkoption
mov dword [rbx + 0x28], eax
sub eax, 1
je 0x140043fd2
cmp eax, 1
jne 0x140043fee
lea edx, [rax + 1]
lea rcx, [0x140076dec]
jmp 0x140043fde
mov edx, 3
lea rcx, [0x140076f88]
mov r9, qword [rbx + 8]
mov r8d, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp qword [rbx + 8], 0
je 0x14004401f
mov edx, 1
mov rcx, rdi
call sym.wluart_static.exe_lua_pushvalue
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov qword [rbx + 0x18], rax
mov eax, 1
jmp 0x140044021
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140045020
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x20
xor r8d, r8d
xor edx, edx
mov rbx, rcx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
mov edx, 1
lea rcx, [0x140088c5c]
mov r9, rbx
lea r8d, [rdx + 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
movzx edx, word [0x140088c5c]
cmp dl, 0xff
jne 0x14004506d
cmp byte [0x140088c5d], 0xfe
jne 0x1400450a7
mov eax, 2
add rsp, 0x20
pop rbx
ret
cmp dl, 0xef
jne 0x1400450a7
cmp byte [0x140088c5d], 0xbb
jne 0x1400450a7
mov edx, 1
lea rcx, [0x140088c5c]
mov r8d, edx
mov r9, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp byte [0x140088c5c], 0xbf
jne 0x1400450a7
mov eax, 1
add rsp, 0x20
pop rbx
ret
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x1400450c0
Capabilities:
Timestomp file

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov rdi, rdx
mov qword [rsp + 0x30], 0
xor r9d, r9d
mov dword [rsp + 0x28], 0x2000000
mov rsi, rcx
mov dword [rsp + 0x20], 3
mov edx, 0x100
mov rcx, qword [rdi + 0x68]
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140045160
lea rcx, [rdi + 0x4c]
lea rdx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea rcx, [rdi + 0x3c]
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea rcx, [rdi + 0x2c]
lea rdx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea r9, [rsp + 0x68]
mov rcx, rbx
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x140045157
mov rcx, rsi
call sym.wluart_static.exe_lua_error
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret

Function at 0x1400461f0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, 1
lea edi, [rax + 1]
mov edx, edi
add rdx, rdx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rdx, rax
mov ecx, edi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140046240
Capabilities:
Copy file
Delete directory
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x290
mov rax, qword [0x1400888e8]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rsi, rdx
mov rbp, rcx
mov rdi, 0xffffffffffffffff
nop
inc rdi
cmp word [rdx + rdi*2], 0
jne 0x140046270
add rdi, 2
mov edx, 1
lea rcx, [rdi + rdi]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov r9, rsi
lea r8, [0x140075390]
mov rbx, rax
mov rdx, rdi
lea rax, [0x1400740e4]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.14002e640
mov rcx, rbx
call fcn.140046500
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x14004638e
lea rdx, [rsp + 0x30]
lea rcx, [0x1400772e8]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140046368
nop
movzx edx, word [rsp + 0x5c]
movzx ecx, word [rsp + 0x5e]
cmp dx, 0x2e
jne 0x140046317
test cx, cx
je 0x140046356
cmp dx, dx
jne 0x140046317
cmp cx, dx
jne 0x140046317
cmp word [rsp + 0x60], 0
je 0x140046356
lea rdx, [rsp + 0x5c]
mov rcx, rsi
call fcn.1400344c0
test byte [rsp + 0x30], 0x10
lea rcx, [rsp + 0x5c]
mov rbx, rax
mov rdx, rax
je 0x14004633d
call fcn.140046240
jmp 0x140046349
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x14004638e
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400462f0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [0x140070da4]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov eax, 1
jmp 0x140046390
xor eax, eax
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14006dc90
mov rbx, qword [rsp + 0x2c0]
add rsp, 0x290
pop rdi
pop rsi
pop rbp
ret
Function at 0x140046500
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
movzx edx, word [rbx]
xor r14d, r14d
mov rdi, rax
lea ebp, [r14 + 0x5c]
test dx, dx
je 0x14004655c
mov r9d, r14d
mov r8d, r14d
nop dword [rax + rax]
cmp dx, 0x2f
jne 0x14004654b
mov word [r8 + rax], bp
inc r9
lea r8, [r9 + r9]
movzx edx, word [r8 + rbx]
test dx, dx
jne 0x140046540
mov edx, ebp
mov rcx, rdi
mov esi, 1
call sub.VCRUNTIME140.dll_wcschr
mov rbx, rax
test rax, rax
je 0x1400465c0
cmp word [rbx - 2], 0x3a
mov word [rbx], r14w
je 0x14004659a
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14004659a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1400465bd
mov word [rbx], bp
mov edx, ebp
sub rbx, rdi
sar rbx, 1
lea eax, [rbx + 1]
cdqe
lea rcx, [rdi + rax*2]
call sub.VCRUNTIME140.dll_wcschr
mov rbx, rax
test rax, rax
jne 0x140046573
jmp 0x1400465c0
mov esi, r14d
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsp + 0x30]
mov eax, esi
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x1400465f0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x280
mov rax, qword [0x1400888e8]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x1400466b7
lea rdx, [rsp + 0x20]
lea rcx, [0x1400772e8]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140046696
nop dword [rax + rax]
movzx edx, word [rsp + 0x4c]
movzx ecx, word [rsp + 0x4e]
cmp dx, 0x2e
jne 0x140046667
test cx, cx
je 0x140046684
cmp dx, dx
jne 0x140046667
cmp cx, dx
jne 0x140046667
cmp word [rsp + 0x50], 0
je 0x140046684
test byte [rsp + 0x20], 0x10
lea rcx, [rsp + 0x4c]
je 0x14004667a
call fcn.1400465f0
jmp 0x140046680
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x1400466b7
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140046640
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [0x140070da4]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x1400466b9
xor eax, eax
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.14006dc90
mov rbx, qword [rsp + 0x298]
add rsp, 0x280
pop rdi
ret
Function at 0x140048ac0
Capabilities:
Delete file

Disassembly:
push rdi
sub rsp, 0x20
lea r8, str.DLL_binary_modules
mov edx, 0xfff0b9d8
mov rdi, rcx
call sym.wluart_static.exe_lua_getfield
test eax, eax
je 0x140048b5d
mov rcx, rdi
call sym.wluart_static.exe_lua_pushnil
mov edx, 0xfffffffe
mov rcx, rdi
call sym.wluart_static.exe_lua_next
test eax, eax
je 0x140048b5d
mov qword [rsp + 0x30], rbx
nop dword [rax]
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 - 2]
call sym.wluart_static.exe_lua_tolwstring
mov edx, 0xffffffff
mov rcx, rdi
mov rbx, rax
call sym.wluart_static.exe_lua_touserdata
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, 0xfffffffe
mov rcx, rdi
call sym.wluart_static.exe_lua_settop
mov edx, 0xfffffffe
mov rcx, rdi
call sym.wluart_static.exe_lua_next
test eax, eax
jne 0x140048b00
mov rbx, qword [rsp + 0x30]
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x140048b70
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbp
sub rsp, 0x30
cmp qword [0x140088c60], 0
mov rbp, rcx
jne 0x140048d4d
mov edx, 0x64
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x28], rsi
xor ecx, ecx
mov qword [rsp + 0x20], rdi
lea r8d, [rdx - 0x5a]
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdx, rax
xor ecx, ecx
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rbx
xor ecx, ecx
mov qword [0x140088c60], rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rdi, qword [0x140088c60]
mov esi, eax
test rdi, rdi
je 0x140048c55
cmp rsi, 2
jbe 0x140048c55
mov edx, 0x4e078
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov edx, 1
lea r9, [rsp + 0x48]
mov rcx, rdi
mov rbx, rax
lea r8d, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140048c2d
mov r8d, dword [rsp + 0x48]
lea r9, [rsp + 0x50]
mov edx, 1
mov byte [rdi], 0x50
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r9d, 0x806
mov dword [rbx + 0x70], 6
mov r8, rsi
mov rdx, rdi
mov rcx, rbx
call fcn.140037900
test eax, eax
jne 0x140048c77
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [0x140088c28], 0
xor eax, eax
mov rsi, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x20]
add rsp, 0x30
pop rbp
ret
mov qword [0x140088c28], rbx
test rbx, rbx
je 0x140048c55
lea rdx, str.package
mov rcx, rbp
call sym.wluart_static.exe_lua_getglobal
lea r8, str.searchers
mov edx, 0xffffffff
mov rcx, rbp
call sym.wluart_static.exe_lua_getfield
mov edx, 0xffffffff
mov rcx, rbp
call sym.wluart_static.exe_luaL_len
mov edx, 0xfffffffe
mov rcx, rbp
mov rbx, rax
call sym.wluart_static.exe_lua_pushvalue
mov r8d, 1
lea rdx, [0x140049120]
mov rcx, rbp
call sym.wluart_static.exe_lua_pushcclosure
lea r8, [rbx + 1]
mov edx, 0xfffffffe
mov rcx, rbp
call sym.wluart_static.exe_lua_rawseti
mov edx, 0xfffffffe
mov rcx, rbp
call sym.wluart_static.exe_lua_pushvalue
mov r8d, 1
lea rdx, [0x140048e50]
mov rcx, rbp
call sym.wluart_static.exe_lua_pushcclosure
lea r8, [rbx + 2]
mov edx, 0xfffffffe
mov rcx, rbp
call sym.wluart_static.exe_lua_rawseti
mov edx, 0xfffffffd
mov rcx, rbp
call sym.wluart_static.exe_lua_settop
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_SetDefaultDllDirectories]
lea rcx, [0x140089680]
call qword [sym.imp.KERNEL32.dll_AddDllDirectory]
mov rax, qword [0x140088c28]
jmp 0x140048c62
mov rax, qword [0x140088c28]
add rsp, 0x30
pop rbp
ret
Function at 0x14004b700
Capabilities:
Encrypt data via sspi
Send data
Send data on socket

Disassembly:
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov rax, qword [0x1400888e8]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov r14, qword [rdx + 0x80]
mov r13, rdx
xor edx, edx
mov qword [rsp + 0x20], r8
mov r12d, r9d
xor r15d, r15d
call qword [sym.wluart_static.exe_lua_pushboolean]
xor esi, esi
test r12d, r12d
je 0x14004b8ca
mov qword [rsp + 0xa8], rbx
mov qword [rsp + 0xa0], rbp
mov qword [rsp + 0x98], rdi
nop dword [rax]
nop word [rax + rax]
mov edx, dword [r14 + 0x20]
mov ebx, r12d
sub ebx, esi
mov ecx, 1
cmp dword [r14 + 0x28], ebx
cmovb ebx, dword [r14 + 0x28]
add edx, dword [r14 + 0x24]
add edx, ebx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rbp, rax
test rax, rax
je 0x14004b8c0
mov ecx, dword [r14 + 0x20]
movsxd rdi, ebx
add rcx, rax
mov edx, esi
mov r8, rdi
add rdx, qword [rsp + 0x20]
call sub.VCRUNTIME140.dll_memmove
mov ecx, dword [r14 + 0x20]
lea r8, [rsp + 0x28]
mov dword [rsp + 0x40], ecx
xor r9d, r9d
mov dword [rsp + 0x44], 7
xor edx, edx
mov qword [rsp + 0x48], rbp
lea rax, [rcx + rbp]
mov dword [rsp + 0x54], 1
mov qword [rsp + 0x58], rax
mov eax, dword [r14 + 0x24]
mov dword [rsp + 0x60], eax
lea rax, [rcx + rdi]
mov rcx, qword [r13 + 0x80]
add rax, rbp
mov qword [rsp + 0x68], rax
xor edi, edi
lea rax, [rsp + 0x40]
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x64], 6
mov dword [rsp + 0x74], edi
mov dword [rsp + 0x2c], 4
mov dword [rsp + 0x28], edi
mov rcx, qword [rcx + 0x18]
call sub.Secur32.dll_EncryptMessage
test eax, eax
js 0x14004b8b1
mov r8d, dword [rsp + 0x60]
xor r9d, r9d
add r8d, dword [rsp + 0x50]
mov rdx, rbp
add r8d, dword [rsp + 0x40]
mov rcx, qword [r13 + 8]
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x14004b8b9
mov rcx, rbp
add r15d, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esi, dword [r14 + 0x28]
cmp esi, r12d
jb 0x14004b770
mov eax, r15d
mov rbp, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14006dc90
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rsi
ret
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, 0xffffffff
jmp 0x14004b878
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14004b875
mov eax, r15d
jmp 0x14004b890
Function at 0x14004bf80
Capabilities:
Resolve dns

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0xe0
mov rax, qword [0x1400888e8]
xor rax, rsp
mov qword [rsp + 0xd0], rax
mov rdi, rcx
mov qword [rsp + 0x28], 0
movzx esi, r8w
lea rcx, [rsp + 0x30]
mov rax, rdx
mov qword [rsp + 0x20], rcx
mov rcx, rax
xor r9d, r9d
xor r8d, r8d
movzx edx, si
call sub.DNSAPI.dll_DnsQuery_A
mov ebx, eax
test eax, eax
jne 0x14004c07f
cmp si, 1
jne 0x14004bfee
mov rax, qword [rsp + 0x30]
mov ecx, dword [rax + 0x20]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov rdx, rax
jmp 0x14004c065
cmp si, 0x1c
jne 0x14004c05c
mov rax, qword [rsp + 0x30]
lea r8, [rsp + 0x50]
xorps xmm0, xmm0
lea rdx, [rsp + 0x38]
mov r9d, 0x80
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
lea ecx, [r9 - 0x69]
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
movups xmmword [rsp + 0xb0], xmm0
movups xmmword [rsp + 0xc0], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rsp + 0x38], xmm0
call sub.WS2_32.dll_inet_ntop
lea rdx, [rsp + 0x50]
jmp 0x14004c065
mov rdx, qword [rsp + 0x30]
mov rdx, qword [rdx + 0x20]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushstring]
mov rcx, qword [rsp + 0x30]
mov edx, 1
call sub.DNSAPI.dll_DnsFree
jmp 0x14004c0b5
cmp ebx, 0x251d
je 0x14004c0ac
cmp ebx, 0x25e5
je 0x14004c0ac
cmp ebx, 0x232b
je 0x14004c0ac
xor edx, edx
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushboolean]
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x14004c0b5
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushnil]
mov eax, 1
mov rcx, qword [rsp + 0xd0]
xor rcx, rsp
call fcn.14006dc90
add rsp, 0xe0
pop rdi
pop rsi
pop rbx
ret
Function at 0x140053190
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1060
call fcn.14006dcc0
sub rsp, rax
mov rax, qword [0x1400888e8]
xor rax, rsp
mov qword [rsp + 0x1050], rax
xor edi, edi
mov r12, r8
mov r13, rdx
mov qword [rsp + 0x30], rdi
mov r15, rcx
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x20], 3
lea r8d, [rdi + 3]
mov edx, 0x80000000
mov rcx, r12
mov ebp, edi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x1400532d2
lea rdx, [rsp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rdi
mov r8d, 0x1000
lea rdx, [rsp + 0x50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400532d2
lea rsi, [r13 + 0x150]
nop
mov eax, dword [rsp + 0x40]
mov rdx, qword [rsi + 0x18]
add ebp, eax
mov rcx, qword [rsi + 0x10]
mov ebx, eax
mov rax, rdx
sub rax, rcx
cmp rbx, rax
ja 0x14005328b
lea rax, [rcx + rbx]
mov qword [rsi + 0x10], rax
mov rax, rsi
cmp rdx, 0x10
jb 0x14005326f
mov rax, qword [rsi]
lea rdi, [rax + rcx]
mov r8, rbx
mov rcx, rdi
lea rdx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + rbx], 0
xor edi, edi
jmp 0x1400532a3
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call fcn.14004e4b0
mov eax, ebp
mov rcx, r14
cmp rax, qword [rsp + 0x48]
jge 0x14005330b
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rdi
mov r8d, 0x1000
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140053240
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, r15
call qword [sym.wluart_static.exe_luaL_getlasterror]
xor r8d, r8d
mov rcx, r15
lea edx, [r8 - 1]
call qword [sym.wluart_static.exe_lua_tolstring]
lea rdx, str.cannot_open_File_:__s
mov rcx, r15
mov r8, rax
call qword [sym.wluart_static.exe_luaL_error]
jmp 0x140053203
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x1050]
xor rcx, rsp
call fcn.14006dc90
mov rbx, qword [rsp + 0x10b8]
add rsp, 0x1060
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140054910
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rbx, r8
mov rdi, rdx
mov rsi, rcx
call qword [sym.wluart_static.exe_lua_pushlightuserdata]
mov r8d, 1
lea rdx, [0x1400546e0]
mov rcx, rsi
call qword [sym.wluart_static.exe_lua_pushcclosure]
mov r8d, 1
lea rdx, str.Task
mov rcx, rsi
call qword [sym.wluart_static.exe_lua_pushnewinstance]
mov edx, 0xffffffff
mov rcx, rsi
call qword [sym.wluart_static.exe_lua_pushvalue]
mov r9, rdi
mov qword [rsp + 0x28], 0
mov r8, rbx
mov dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi], rax
test rax, rax
je 0x1400549bb
xor r9d, r9d
mov qword [rsp + 0x20], 0
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.wluart_static.exe_lua_callk]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rsi
call qword [sym.wluart_static.exe_luaL_getlasterror]
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 - 1]
call qword [sym.wluart_static.exe_lua_tolstring]
lea rdx, str.async_error_:__s
mov rcx, rsi
mov r8, rax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
jmp qword [sym.wluart_static.exe_luaL_error]

Function at 0x140055700
Capabilities:
Initialize winsock library

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
lea rdx, [0x140088c90]
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea rax, [0x1400556d0]
mov rcx, rbx
lea r9, str.get_error
mov qword [rsp + 0x20], rax
lea r8, str.getmime
lea rdx, [0x140070450]
call qword [sym.wluart_static.exe_lua_registermodule]
lea rax, str.__gc
mov rcx, rbx
mov qword [rsp + 0x28], rax
lea r9, [0x14004bb10]
lea rax, str.accept
lea r8, str.Socket
mov qword [rsp + 0x20], rax
lea rdx, [0x140089630]
call qword [sym.wluart_static.exe_lua_registerobject]
lea rax, str.__gc
mov rcx, rbx
mov qword [rsp + 0x28], rax
lea r9, [0x14004f350]
lea rax, [0x140077dc0]
lea r8, str.Http
mov qword [rsp + 0x20], rax
lea rdx, [0x140088c78]
call qword [sym.wluart_static.exe_lua_registerobject]
lea rax, str.__gc
mov rcx, rbx
mov qword [rsp + 0x28], rax
lea r9, [0x1400540a0]
lea rax, str.get_hostname
lea r8, [0x140078714]
mov qword [rsp + 0x20], rax
lea rdx, [0x140088c7c]
call qword [sym.wluart_static.exe_lua_registerobject]
mov eax, 1
add rsp, 0x30
pop rbx
ret