joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4149c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x18]
mov edx, ebx
push ebp
push esi
mov esi, dword [eax + 0x10]
push edi
mov dword [esp + 0x10], esi
mov ebp, dword [esi + 0x48]
xor ebp, ebx
test ebx, ebx
je 0x4149ff
mov edi, dword [esp + 0x20]
movzx ecx, byte [edi + edx - 1]
mov eax, ebp
shl eax, 5
add ecx, eax
mov eax, ebp
shr eax, 2
add ecx, eax
xor ebp, ecx
sub edx, 1
jne 0x4149e5
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x18]
dec ecx
and ecx, ebp
mov edi, dword [eax + ecx*4]
lea eax, [eax + ecx*4]
mov dword [esp + 0x14], eax
test edi, edi
je 0x414a7e
movzx eax, byte [edi + 7]
cmp ebx, eax
jne 0x414a73
mov ecx, dword [esp + 0x20]
lea edx, [edi + 0x10]
mov esi, ebx
sub esi, 4
jb 0x414a41
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x414a46
add ecx, 4
add edx, 4
sub esi, 4
jae 0x414a30
cmp esi, 0xfffffffc
je 0x414aaf
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x414a73
cmp esi, 0xfffffffd
je 0x414aaf
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x414a73
cmp esi, 0xfffffffe
je 0x414aaf
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x414a73
cmp esi, 0xffffffff
je 0x414aaf
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x414aaf
mov edi, dword [edi + 0xc]
test edi, edi
jne 0x414a16
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0x1c]
cmp eax, dword [esi + 0x20]
jl 0x414b51
mov edi, dword [esp + 0x1c]
cmp eax, 0x7fffffff
jne 0x414acf
push 1
push edi
call fcn.0040b720
add esp, 8
cmp dword [esi + 0x1c], 0x7fffffff
je 0x414b9e
jmp 0x414acf
mov ecx, dword [esp + 0x10]
mov al, byte [edi + 5]
mov cl, byte [ecx + 0x4c]
xor cl, 0x18
test al, cl
je 0x414ac5
xor al, 0x18
mov byte [edi + 5], al
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov esi, dword [esi + 0x20]
cmp esi, 0x1fffffff
jg 0x414b3b
mov ebx, dword [edi + 0x10]
add esi, esi
mov edi, dword [ebx + 0x20]
cmp esi, edi
jge 0x414af3
push esi
push edi
push dword [ebx + 0x18]
call fcn.00415050
add esp, 0xc
lea eax, [esi*4]
push eax
lea eax, [edi*4]
push eax
push dword [ebx + 0x18]
mov eax, dword [esp + 0x28]
push eax
call fcn.0040f320
add esp, 0x10
test eax, eax
jne 0x414b22
cmp esi, edi
jge 0x414b37
push edi
push esi
push dword [ebx + 0x18]
jmp 0x414b2f
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x20], esi
cmp esi, edi
jle 0x414b37
push esi
push edi
push eax
call fcn.00415050
add esp, 0xc
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x18]
dec ecx
and ecx, ebp
lea eax, [eax + ecx*4]
mov dword [esp + 0x14], eax
jmp 0x414b55
mov edi, dword [esp + 0x10]
lea eax, [ebx + 0x11]
push eax
push 4
push dword [esp + 0x24]
call fcn.0040b7e0
mov esi, eax
push ebx
push dword [esp + 0x30]
lea ecx, [esi + 0x10]
mov dword [esi + 8], ebp
mov byte [esi + 6], 0
push ecx
mov byte [esi + ebx + 0x10], 0
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x2c]
add esp, 0x18
mov byte [esi + 7], bl
mov eax, dword [ecx]
mov dword [esi + 0xc], eax
mov eax, esi
mov dword [ecx], esi
inc dword [edi + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push 4
push edi
call fcn.00408dc0
int3
Function at 0x414ca0
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
mov eax, esi
xor eax, dword [esp + 0x10]
test esi, esi
je 0x414ccf
push edi
mov edi, dword [esp + 0xc]
movzx edx, byte [edi + esi - 1]
mov ecx, eax
shl ecx, 5
add edx, ecx
mov ecx, eax
shr ecx, 2
add edx, ecx
xor eax, edx
sub esi, 1
jne 0x414cb4
pop edi
pop esi
ret
Function at 0x422030
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov edx, dword [esp + 0x2c]
xorps xmm0, xmm0
mov ecx, dword [esp + 0x38]
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
push esi
mov esi, dword [esp + 0x3c]
movlpd qword [esp + 0x24], xmm0
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
push edi
mov edi, 0xff
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x10], eax
xor ebp, edx
xor edi, ebx
mov ebx, dword [esp + 0x14]
xor ecx, esi
xor ebx, dword [esp + 0x10]
mov eax, ebp
mov ebp, dword [esp + 0x38]
xor esi, ebx
xor edx, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], edx
mov dword [ebp + 4], esi
mov esi, dword [esp + 0x18]
mov dword [ebp], edx
xor esi, eax
mov edx, dword [esp + 0x14]
mov dword [ebp + 8], esi
xor edx, ecx
mov dword [ebp + 0xc], edx
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x10], esi
shld dword [esp + 0x10], ebp, 0x11
xor dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x10], edi
shl dword [esp + 0x10], 0xd
shrd edi, ebx, 0x13
shl ebp, 0x11
xor ebp, eax
mov dword [esp + 0x14], 0
or dword [esp + 0x14], edi
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
shr ebx, 0x13
or edi, ebx
mov dword [esp + 0x18], esi
sub dword [esp + 0x1c], 1
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], edi
mov dword [eax + 0x1c], edi
mov edi, esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x24]
mov dword [eax + 0x10], ebp
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ebx
jne 0x422075
push dword [esp + 0x40]
mov esi, dword [esp + 0x38]
push dword [esp + 0x40]
push esi
call sym.wluart.exe_lua_pushinteger
push dword [esp + 0x54]
push dword [esp + 0x54]
push esi
call sym.wluart.exe_lua_pushinteger
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x42a320
Capabilities:
Get common file path

Disassembly:
push esi
push 0x470fb0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
push 0xfde9
mov dword [0x470fb8], eax
mov dword [0x470fbc], 0
call dword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov esi, dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
push str..UTF8
push 0
call esi
push 0x461bd9
push 5
call esi
mov esi, dword [esp + 0x18]
push 0
push 0x4649c8
push 0x464980
push 0x464c64
push esi
call sym.wluart.exe_lua_registermodule
push 0x467a2c
push 0x467a04
push 0x442610
push str.Task
push 0x471690
push esi
call sym.wluart.exe_lua_registerobject
push 0x467040
push 0x466f28
push 0x43e3a0
push str.File
push sym.wluart.exe_TFile
push esi
call sym.wluart.exe_lua_registerobject
add esp, 0x54
push 0x4674c8
push 0x467478
push 0x43fff0
push str.Buffer
push sym.wluart.exe_TBuffer
push esi
call sym.wluart.exe_lua_registerobject
push 0x4672f8
push 0x4672d0
push 0x43ec60
push str.Pipe
push sym.wluart.exe_TPipe
push esi
call sym.wluart.exe_lua_registerobject
push 0x4673c0
push 0x467318
push 0x43f110
push str.Directory
push sym.wluart.exe_TDirectory
push esi
call sym.wluart.exe_lua_registerobject
add esp, 0x48
push 0x466dc8
push 0x466d90
push 0x43cf50
push str.Datetime
push sym.wluart.exe_TDatetime
push esi
call sym.wluart.exe_lua_registerobject
push 0x46773c
push 0x467734
push 0x440940
push 0x464c84
push sym.wluart.exe_TCOM
push esi
call sym.wluart.exe_lua_registerobject
add esp, 0x30
push 0x4716c0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, 1
pop esi
ret

Function at 0x42a480
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
sub esp, 0x20c
mov eax, dword [0x470d00]
xor eax, esp
mov dword [esp + 0x208], eax
push esi
mov esi, dword [esp + 0x214]
push edi
push esi
xor edi, edi
call sym.wluart.exe_lua_gettop
add esp, 4
test eax, eax
je 0x42a4ba
push edi
push 1
push esi
call sym.wluart.exe_lua_tolwstring
add esp, 0xc
mov edi, eax
lea eax, [esp + 8]
push eax
push 0
push edi
push 0x4716c0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x42a546
push 0xffffffffffffffff
lea eax, [esp + 0xc]
push eax
push esi
call sym.wluart.exe_lua_pushlwstring
add esp, 0xc
cmp dword [esp + 0x21c], 0
je 0x42a533
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x461bd9
push str..tmp
push 0
push 0xffffffffffffffff
push esi
call sym.wluart.exe_lua_tolstring
add esp, 0xc
push eax
push esi
call sym.wluart.exe_luaL_gsub
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, str.Directory
push 1
push eax
push esi
call sym.wluart.exe_lua_pushnewinstance
add esp, 0xc
jmp 0x42a54f
mov eax, str.File
push 1
push eax
push esi
call sym.wluart.exe_lua_pushnewinstance
add esp, 0xc
jmp 0x42a54f
push esi
call sym.wluart.exe_lua_pushnil
add esp, 4
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [esp + 0x214]
add esp, 4
mov eax, 1
pop edi
pop esi
xor ecx, esp
call fcn.0045f6d1
add esp, 0x20c
ret
Function at 0x42c800
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
mov esi, 1
call sym.wluart.exe_lua_gettop
mov edi, dword [ebp + 0x10]
add esp, 4
sub eax, edi
je 0x42c8de
dec eax
push edi
push ebx
mov dword [esp + 0x44], eax
call sym.wluart.exe_lua_type
add esp, 8
cmp eax, 3
jne 0x42c8ab
push edi
push ebx
call sym.wluart.exe_lua_isinteger
add esp, 8
push 0
push edi
push ebx
test eax, eax
je 0x42c867
call sym.wluart.exe_lua_tointegerx
push edx
push eax
push str._lld
push dword [ebp + 0xc]
call fcn.0041cfd0
add esp, 0x1c
jmp 0x42c882
call sym.wluart.exe_lua_tonumberx
add esp, 4
fstp qword [esp]
push str._.14g
push dword [ebp + 0xc]
call fcn.0041cfd0
add esp, 0x10
test esi, esi
je 0x42c88a
test eax, eax
jg 0x42c8d7
xor esi, esi
mov eax, dword [esp + 0x3c]
inc edi
test eax, eax
jne 0x42c828
test esi, esi
jne 0x42c8de
push esi
push esi
push ebx
call sym.wluart.exe_luaL_fileresult
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x38]
push eax
push edi
push ebx
call sym.wluart.exe_luaL_checklstring
add esp, 0xc
test esi, esi
je 0x42c88a
push dword [ebp + 0xc]
push dword [esp + 0x3c]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, dword [esp + 0x38]
jne 0x42c88a
mov esi, 1
jmp 0x42c88c
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x42f550
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
push edi
xor edi, edi
test ebx, ebx
je 0x42f56f
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x42f564
sub ebx, ecx
jmp 0x42f571
xor ebx, ebx
mov esi, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
lea ebp, [eax + 1]
push edi
push esi
call sym.wluart.exe_zip_entry_openbyindex
inc edi
add esp, 8
mov dword [esp + 0x20], edi
test eax, eax
jne 0x42f6b5
push esi
call sym.wluart.exe_zip_entry_name
mov edi, eax
add esp, 4
mov esi, edi
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x42f5b0
sub esi, ecx
inc esi
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [esp + 0x30]
add esp, 4
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x42f5e8
push ebx
push edi
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x42f67f
mov eax, dword [esp + 0x14]
push esi
push edi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], esi
push eax
push dword [esp + 0x24]
call fcn.0043b0e0
mov edi, eax
xor ecx, ecx
mov eax, dword [esp + 0x24]
add esp, 0x14
xor esi, esi
mov word [edi + eax*2 - 2], cx
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x42f653
lea ebx, [ecx + 0x5c]
cmp word [edi + esi*2], 0x2f
jne 0x42f64a
xor eax, eax
push edi
mov word [edi + esi*2], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x42f642
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [edi + esi*2], bx
mov eax, dword [esp + 0x10]
inc esi
cmp esi, eax
jl 0x42f620
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x28]
push esi
call sym.wluart.exe_zip_entry_isdir
add esp, 4
test eax, eax
jne 0x42f673
push edi
push esi
call sym.wluart.exe_zip_entry_fread
add esp, 8
neg eax
sbb ebp, ebp
inc ebp
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x42f683
mov esi, dword [esp + 0x28]
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
call sym.wluart.exe_zip_entry_close
mov eax, dword [esp + 0x20]
add esp, 8
mov edi, dword [esp + 0x20]
inc eax
mov dword [esp + 0x18], eax
test ebp, ebp
jne 0x42f582
pop edi
pop esi
pop ebp
xor edx, edx
pop ebx
add esp, 0x14
ret
mov eax, dword [esp + 0x18]
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x42f6f0
Capabilities:
Set current directory

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
push esi
push edi
call sym.wluart.exe_lua_isstring
add esp, 8
test eax, eax
je 0x42f716
push 0
push esi
push edi
call sym.wluart.exe_lua_tolwstring
add esp, 0xc
jmp 0x42f730
push dword [sym.wluart.exe_TDirectory]
push esi
push edi
call sym.wluart.exe_lua_checkcinstance
mov eax, dword [eax + 0x50]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
add esp, 0x10
mov edi, eax
call fcn.0043f2e0
push edi
mov esi, eax
call fcn.0043f580
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, esi
pop edi
pop esi
ret
Function at 0x42fb40
Capabilities:
Compute adler32 checksum
Enumerate pe sections

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0x14]
mov eax, 0x5e6ea9af
mul ebp
push esi
mov esi, dword [esp + 0x10]
shr edx, 0xb
imul eax, edx, 0x15b0
mov edx, ebp
push edi
mov edi, dword [esp + 0x18]
movzx ecx, si
shr esi, 0x10
sub edx, eax
mov dword [esp + 0x14], edx
test edi, edi
jne 0x42fb7a
lea eax, [edi + 1]
pop edi
pop esi
pop ebp
pop ecx
ret
test ebp, ebp
je 0x42fc72
push ebx
xor ebx, ebx
cmp edx, 7
jbe 0x42fbdd
mov ebp, 7
sub ebp, edi
movzx eax, byte [edi]
add ebx, 8
add ecx, eax
movzx eax, byte [edi + 1]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 2]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 3]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 4]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 5]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 6]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 7]
add edi, 8
add esi, ecx
add ecx, eax
add esi, ecx
lea eax, [edi + ebp]
cmp eax, edx
jb 0x42fb91
xor ebp, ebp
cmp ebx, edx
jae 0x42fc32
mov eax, edx
sub eax, ebx
cmp eax, 2
jb 0x42fc23
sub edx, ebx
sub edx, 2
shr edx, 1
inc edx
lea eax, [ebx + edx*2]
mov ebx, ebp
mov dword [esp + 0x10], eax
nop dword [eax]
movzx eax, byte [edi]
add ecx, eax
movzx eax, byte [edi + 1]
add ebp, ecx
add edi, 2
add ecx, eax
add ebx, ecx
sub edx, 1
jne 0x42fc00
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x18]
jae 0x42fc2d
jmp 0x42fc25
mov ebx, ebp
movzx eax, byte [edi]
add ecx, eax
add esi, ecx
inc edi
lea eax, [ebx + ebp]
add esi, eax
mov eax, 0x80078071
mov ebp, dword [esp + 0x20]
mul ecx
shr edx, 0xf
imul eax, edx, 0xffff000f
add ecx, eax
mov eax, 0x80078071
mul esi
shr edx, 0xf
imul eax, edx, 0xffff000f
mov edx, 0x15b0
add esi, eax
sub ebp, dword [esp + 0x18]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], edx
jne 0x42fb83
pop ebx
shl esi, 0x10
pop edi
lea eax, [ecx + esi]
pop esi
pop ebp
pop ecx
ret

Function at 0x430000
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x43000d
xor eax, eax
pop esi
ret
mov eax, dword [esp + 8]
push edi
mov edi, dword [esp + 0x14]
not eax
test edi, edi
je 0x430052
nop dword [eax]
mov cl, byte [esi]
lea esi, [esi + 1]
movzx edx, cl
mov ecx, edx
shr edx, 4
xor ecx, eax
shr eax, 4
and ecx, 0xf
xor eax, dword [ecx*4 + 0x465b28]
mov ecx, eax
shr eax, 4
and ecx, 0xf
xor edx, ecx
xor eax, dword [edx*4 + 0x465b28]
sub edi, 1
jne 0x430020
pop edi
not eax
pop esi
ret
Function at 0x430f20
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov eax, dword [esi + 0x48]
push dword [eax + 0x3c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__telli64
mov ecx, dword [esp + 0x1c]
add esp, 8
mov edi, dword [esp + 0x18]
cdq
mov ebx, eax
mov eax, dword [esi + 0x48]
add ecx, dword [eax + 0x40]
adc edi, dword [eax + 0x44]
js 0x430f91
jg 0x430f58
test ecx, ecx
jb 0x430f91
cmp ebx, ecx
jne 0x430f60
cmp edx, edi
je 0x430f74
push 0
push edi
push ecx
push dword [eax + 0x3c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
test eax, eax
jne 0x430f91
mov eax, dword [esi + 0x48]
push dword [eax + 0x3c]
push dword [esp + 0x24]
push 1
push dword [esp + 0x28]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
pop edi
pop esi
pop ebx
ret
pop edi
mov dword [esi + 0x1c], 0x16
xor eax, eax
pop esi
pop ebx
ret
Function at 0x439cd0
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2040
call fcn.0045fc10
mov eax, dword [0x470d00]
xor eax, esp
mov dword [esp + 0x203c], eax
push esi
mov esi, dword [esp + 0x2048]
mov dword [esp + 4], 0
push edi
mov edi, dword [esp + 0x2050]
test esi, esi
jne 0x439d1e
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x2040
ret
push 0x2000
lea eax, [esp + 0x48]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x38
lea eax, [esp + 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wstat64]
add esp, 0x20
test eax, eax
je 0x439d6c
pop edi
mov eax, 0xfffffffd
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x2040
ret
mov ecx, dword [esp + 0x12]
test cl, cl
js 0x439d7b
or dword [esi + 0x4e008], 1
movzx eax, cx
and ecx, 0xf000
shl eax, 0x10
or eax, dword [esi + 0x4e008]
mov dword [esi + 0x4e008], eax
cmp ecx, 0x4000
jne 0x439da4
or eax, 0x10
mov dword [esi + 0x4e008], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
push ebx
push 0x461a10
push edi
mov dword [esi + 0x4e010], eax
mov dword [esi + 0x4e014], ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x439de9
lea eax, [ebx - 0x10]
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x2040
ret
push ebp
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
lea eax, [esp + 0x4c]
push ebx
push 0x2000
push 1
push eax
call ebp
mov edi, eax
add esp, 0x10
test edi, edi
je 0x439e9a
nop dword [eax]
add dword [esi + 0x60], edi
lea eax, [esp + 0x4c]
push edi
adc dword [esi + 0x64], 0
push eax
push dword [esi + 0x70]
call fcn.00430000
add esp, 0xc
mov dword [esi + 0x70], eax
test byte [esi + 0x50], 0xf
lea eax, [esp + 0x4c]
jne 0x439e5c
push edi
push eax
push dword [esi + 0x7c]
mov eax, dword [esi + 0x3c]
push dword [esi + 0x78]
push dword [esi + 0x44]
call eax
add esp, 0x14
cmp eax, edi
jne 0x439e92
add dword [esi + 0x78], edi
adc dword [esi + 0x7c], 0
add dword [esi + 0x68], edi
adc dword [esi + 0x6c], 0
jmp 0x439e78
push 0
push edi
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.00434f30
add esp, 0x10
cmp eax, 1
je 0x439e78
test eax, eax
jne 0x439e92
push ebx
push 0x2000
lea eax, [esp + 0x54]
push 1
push eax
call ebp
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x439e10
jmp 0x439e9a
mov dword [esp + 0x10], 0xfffffff8
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [esp + 0x2050]
add esp, 4
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
call fcn.0045f6d1
add esp, 0x2040
ret
Function at 0x439f40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x45c
mov eax, dword [0x470d00]
xor eax, esp
mov dword [esp + 0x458], eax
push esi
mov esi, dword [esp + 0x464]
push edi
mov edi, dword [esp + 0x46c]
test esi, esi
jne 0x439f82
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x45c
ret
cmp dword [esi + 0x14], 1
je 0x439fa4
pop edi
mov eax, 0xfffffffc
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x45c
ret
cmp edi, dword [esi + 0x10]
jb 0x439fc5
pop edi
mov eax, 0xfffffff6
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x45c
ret
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + edi*4]
add eax, dword [ecx]
jne 0x439fee
pop edi
mov eax, 0xfffffff5
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x45c
ret
push ebx
movzx ebx, word [eax + 0x1c]
push ebp
lea ebp, [eax + 0x2e]
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x43a00f
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [esi + 0x5c], 0
push 0x2f
push 0x5c
push ebx
push ebp
call fcn.0043a600
add esp, 0x10
mov dword [esi + 0x5c], eax
pop ebp
pop ebx
test eax, eax
jne 0x43a042
pop edi
mov eax, 0xfffffffe
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x45c
ret
lea eax, [esp + 8]
push eax
push edi
push esi
call fcn.00432250
add esp, 0xc
test eax, eax
jne 0x43a071
pop edi
mov eax, 0xfffffffd
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f6d1
add esp, 0x45c
ret
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esi + 0x68], eax
mov eax, dword [esp + 0x38]
mov dword [esi + 0x60], eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x70], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 0x6c], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esi + 0x78], eax
mov eax, dword [esp + 0x48]
mov dword [esi + 0x64], ecx
mov ecx, dword [esp + 0x14]
mov dword [esi + 0xa0], eax
mov ax, word [esp + 0x1e]
mov dword [esi + 0x7c], ecx
mov ecx, dword [esp + 0x4c]
mov word [esi + 0xa8], ax
mov eax, dword [esp + 0x44]
mov dword [esi + 0xa4], ecx
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x4e008], eax
mov eax, dword [esp + 0x20]
mov dword [esi + 0x58], edi
mov dword [esi + 0x4e014], ecx
mov ecx, dword [esp + 0x460]
mov dword [esi + 0x4e010], eax
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0045f6d1
add esp, 0x45c
ret
Function at 0x43d5a0
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push 0x470170
push str.read
push 2
push edi
call sym.wluart.exe_luaL_checkoption
push edi
mov ebx, eax
call sym.wluart.exe_lua_gettop
push dword [sym.wluart.exe_TFile]
mov ebp, eax
push 1
push edi
call sym.wluart.exe_lua_toself
mov esi, eax
add esp, 0x20
cmp dword [esi + 0x14], 0
jne 0x43d6db
mov eax, dword [esi + 4]
test eax, eax
je 0x43d5f2
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push dword [ebx*4 + 0x470184]
push dword [esi + 0x50]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
add esp, 8
mov dword [esi + 4], eax
test eax, eax
jne 0x43d629
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
push str.File_open_failed__s
push edi
call sym.wluart.exe_luaL_error
add esp, 0x10
mov dword [esi + 0x54], ebx
cmp ebx, 2
jge 0x43d668
push dword [esi + 4]
call sym.wluart.exe_detectBOM
add esp, 4
mov dword [esi + 0x18], eax
cmp ebp, 1
jne 0x43d64d
test eax, eax
jne 0x43d6ad
mov dword [esi + 0x18], ebp
jmp 0x43d6ad
cmp ebp, 3
jne 0x43d6ad
push 0x470194
push str.binary
push ebp
push edi
call sym.wluart.exe_luaL_checkoption
mov dword [esi + 0x18], eax
jmp 0x43d6aa
push 0x470194
push str.utf8
push 3
push edi
call sym.wluart.exe_luaL_checkoption
add esp, 0x10
mov dword [esi + 0x18], eax
sub eax, 1
je 0x43d698
sub eax, 1
jne 0x43d6ad
push dword [esi + 4]
push 1
push 2
push 0x46709c
jmp 0x43d6a4
push dword [esi + 4]
push 1
push 3
push 0x467218
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [esi + 4], 0
je 0x43d6db
push 1
push edi
call sym.wluart.exe_lua_pushvalue
push dword [esi + 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret