joyce8/EMBER2024-capa huggingface dataset:
Function at 0x425a9b
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
xor edi, edi
cmp dword [esp + 0x2c], edi
je 0x425abc
mov esi, dword [esp + 0x2c]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x425ab1
sub esi, ecx
jmp 0x425abe
xor esi, esi
xor ebp, ebp
xor ebx, ebx
mov dword [esp + 0x1c], ebp
inc ebx
push edi
push dword [esp + 0x2c]
call fcn.0042edce
inc edi
mov dword [esp + 0x28], edi
pop ecx
pop ecx
test eax, eax
jne 0x425be9
push dword [esp + 0x28]
call fcn.0042edae
mov edi, eax
mov dword [esp + 0x1c], eax
pop ecx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x425af3
sub edi, ecx
inc edi
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
cmp dword [esp + 0x30], 0
pop ecx
mov dword [esp + 0x14], eax
je 0x425b2e
push esi
push dword [esp + 0x1c]
push dword [esp + 0x34]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x425bc3
mov eax, dword [esp + 0x14]
push edi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], edi
push eax
push dword [esp + 0x24]
call fcn.0042fabe
mov edi, eax
xor ecx, ecx
mov eax, dword [esp + 0x24]
add esp, 0x14
xor ebp, ebp
mov word [edi + eax*2 - 2], cx
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x425b98
cmp word [edi + ebp*2], 0x2f
jne 0x425b93
xor eax, eax
push edi
mov word [edi + ebp*2], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x425b88
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x5c
pop eax
mov word [edi + ebp*2], ax
mov eax, dword [esp + 0x10]
inc ebp
cmp ebp, eax
jl 0x425b66
push dword [esp + 0x28]
call fcn.0042ebaf
pop ecx
test eax, eax
jne 0x425bb7
push edi
push dword [esp + 0x2c]
call fcn.0042ea31
neg eax
pop ecx
sbb ebx, ebx
pop ecx
inc ebx
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebp, dword [esp + 0x20]
pop ecx
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push dword [esp + 0x2c]
call fcn.0042e64c
mov edi, dword [esp + 0x28]
inc ebp
mov dword [esp + 0x24], ebp
pop ecx
pop ecx
test ebx, ebx
jne 0x425ac7
pop edi
pop esi
mov eax, ebp
xor edx, edx
pop ebp
pop ebx
add esp, 0x14
ret

Function at 0x425c6b
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call sym.wluart.exe_lua_isstring
pop ecx
pop ecx
test eax, eax
je 0x425c93
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call sym.wluart.exe_lua_tolwstring
add esp, 0xc
jmp 0x425cb0
push dword [sym.wluart.exe_TDirectory]
push dword [ebp + 0xc]
push dword [ebp + 8]
call sym.wluart.exe_lua_checkcinstance
push dword [eax + 0x50]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
add esp, 0x10
mov edi, eax
call fcn.004332c4
push edi
mov esi, eax
call fcn.004334e6
pop ecx
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]
pop ecx
pop edi
mov eax, esi
pop esi
pop ebp
ret
Function at 0x425d58
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x270
mov eax, dword [0x459c80]
xor eax, esp
mov dword [esp + 0x26c], eax
mov eax, dword [esp + 0x278]
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push ebp
mov ebp, dword [esp + 0x27c]
push esi
mov esi, dword [esp + 0x28c]
push edi
xor edi, edi
mov dword [esp + 0x18], eax
inc edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], edi
test esi, esi
je 0x425dd9
or dword [esp + 0x14], 0xffffffff
push 0x44eb34
push esi
call fcn.00425a3c
mov edi, eax
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.0042fb0a
mov esi, eax
push esi
push ebp
call fcn.00425bf5
push edi
call ebx
push esi
call ebx
mov edi, dword [esp + 0x30]
add esp, 0x20
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push 0x44f910
push eax
call fcn.00425cd5
pop ecx
push eax
call fcn.00425a3c
pop ecx
pop ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x28], eax
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x425f54
push 0x2e
pop ecx
cmp word [esp + 0x58], cx
jne 0x425e2b
cmp word [esp + 0x5a], cx
je 0x425f2e
cmp word [esp + 0x5a], 0
je 0x425f2e
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x1c]
call fcn.00425a3c
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x10], ecx
test esi, esi
je 0x425e5a
lea eax, [esp + 0x58]
push eax
push esi
call fcn.00425a3c
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
mov esi, eax
jmp 0x425e5c
xor esi, esi
test byte [esp + 0x2c], 0x10
je 0x425e85
test esi, esi
lea eax, [esp + 0x58]
cmovne eax, esi
push eax
push dword [esp + 0x290]
push ecx
push ebp
call fcn.00425d58
add esp, 0x10
and edi, eax
jmp 0x425f1f
or dword [esp + 0x20], 0xffffffff
cmp dword [esp + 0x48], 0
je 0x425e98
cmp dword [esp + 0x4c], 0
jne 0x425ece
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x58]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x425ec5
test dx, dx
je 0x425ec1
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x425ec5
add eax, 4
add ecx, 4
test dx, dx
jne 0x425e9f
xor eax, eax
jmp 0x425eca
sbb eax, eax
or eax, 1
test eax, eax
je 0x425f1f
lea eax, [esp + 0x20]
test esi, esi
push eax
lea eax, [esp + 0x5c]
cmovne eax, esi
push eax
call fcn.0042fb0a
push eax
push dword [ebp + 4]
mov dword [esp + 0x34], eax
call fcn.0042edbb
add esp, 0x10
test eax, eax
jne 0x425f0b
push dword [esp + 0x10]
push dword [ebp + 4]
call fcn.0042ea80
pop ecx
pop ecx
test eax, eax
jne 0x425f0b
inc eax
jmp 0x425f0d
xor eax, eax
push dword [ebp + 4]
and edi, eax
call fcn.0042e64c
push dword [esp + 0x28]
call ebx
pop ecx
pop ecx
push dword [esp + 0x10]
call ebx
push esi
call ebx
mov eax, dword [esp + 0x1c]
pop ecx
pop ecx
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, dword [esp + 0x1c]
test eax, eax
mov eax, dword [esp + 0x14]
push 0x2e
pop ecx
jne 0x425e0d
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [esp + 0x28]
call ebx
pop ecx
mov ecx, dword [esp + 0x27c]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00449662
add esp, 0x270
ret
Function at 0x42610b
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x426118
xor eax, eax
pop esi
ret
mov edx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x14]
not edx
test edi, edi
je 0x426157
mov al, byte [esi]
inc esi
movzx ecx, al
mov eax, ecx
shr ecx, 4
xor eax, edx
shr edx, 4
and eax, 0xf
xor edx, dword [eax*4 + 0x44fa28]
mov eax, edx
shr edx, 4
and eax, 0xf
xor ecx, eax
xor edx, dword [ecx*4 + 0x44fa28]
sub edi, 1
jne 0x426127
not edx
pop edi
mov eax, edx
pop esi
ret
Function at 0x426c6c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
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 edi, dword [ebp + 0x10]
cdq
pop ecx
mov ebx, eax
mov eax, dword [esi + 0x48]
pop ecx
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + 0x40]
adc edi, dword [eax + 0x44]
js 0x426cd8
jg 0x426ca3
test ecx, ecx
jb 0x426cd8
cmp ebx, ecx
jne 0x426cab
cmp edx, edi
je 0x426cbf
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 0x426cd8
mov eax, dword [esi + 0x48]
push dword [eax + 0x3c]
push dword [ebp + 0x18]
push 1
push dword [ebp + 0x14]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
jmp 0x426ce1
mov dword [esi + 0x1c], 0x16
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x42ea80
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x203c
call fcn.00449ba0
mov eax, dword [0x459c80]
xor eax, esp
mov dword [esp + 0x2038], eax
push ebx
mov ebx, dword [esp + 0x2048]
push esi
mov esi, dword [esp + 0x2048]
push edi
xor edi, edi
test esi, esi
jne 0x42eab7
or eax, 0xffffffff
jmp 0x42eb97
push ebp
mov ebp, 0x2000
lea eax, [esp + 0x48]
push ebp
push edi
push eax
call sub.VCRUNTIME140.dll_memset
push 0x38
lea eax, [esp + 0x20]
push edi
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wstat64]
add esp, 0x20
test eax, eax
je 0x42eaed
push 0xfffffffffffffffd
jmp 0x42eb51
mov ecx, dword [esp + 0x16]
test cl, cl
js 0x42eafc
or dword [esi + 0x4e008], 1
movzx eax, cx
mov edx, 0x4000
shl eax, 0x10
and ecx, 0xf000
or eax, dword [esi + 0x4e008]
mov dword [esi + 0x4e008], eax
cmp cx, dx
jne 0x42eb27
or eax, 0x10
mov dword [esi + 0x4e008], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
push 0x44b944
push ebx
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
pop ecx
pop ecx
test ebx, ebx
jne 0x42eb54
push 0xfffffffffffffff0
pop eax
jmp 0x42eb96
push ebx
push ebp
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
jmp 0x42eb77
push eax
lea eax, [esp + 0x4c]
push eax
push esi
call fcn.0042ef62
add esp, 0xc
test eax, eax
js 0x42eb89
push ebx
push 0x2000
lea eax, [esp + 0x50]
push 1
push eax
call ebp
add esp, 0x10
test eax, eax
jne 0x42eb5e
jmp 0x42eb8c
push 0xfffffffffffffff8
pop edi
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
pop ecx
mov eax, edi
pop ebp
mov ecx, dword [esp + 0x2044]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00449662
add esp, 0x203c
ret
Function at 0x42edce
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x45c
mov eax, dword [0x459c80]
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 0x42edfe
or eax, 0xffffffff
jmp 0x42eee9
cmp dword [esi + 0x14], 1
je 0x42ee0c
push 0xfffffffffffffffc
pop eax
jmp 0x42eee9
cmp edi, dword [esi + 0x10]
jb 0x42ee15
push 0xfffffffffffffff6
jmp 0x42ee06
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + edi*4]
add eax, dword [ecx]
jne 0x42ee26
push 0xfffffffffffffff5
jmp 0x42ee06
cmp dword [esi + 0x5c], 0
push ebx
movzx ebx, word [eax + 0x1c]
push ebp
lea ebp, [eax + 0x2e]
je 0x42ee43
push dword [esi + 0x5c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
and dword [esi + 0x5c], 0
pop ecx
push 0x2f
push 0x5c
push ebx
push ebp
call fcn.0042f23f
add esp, 0x10
mov dword [esi + 0x5c], eax
pop ebp
pop ebx
test eax, eax
jne 0x42ee5e
push 0xfffffffffffffffe
jmp 0x42ee06
lea eax, [esp + 8]
push eax
push edi
push esi
call fcn.00427ff9
add esp, 0xc
test eax, eax
jne 0x42ee75
push 0xfffffffffffffffd
jmp 0x42ee06
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 + 0x78], eax
mov eax, dword [esp + 0x48]
mov dword [esi + 0x6c], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esi + 0xa0], eax
mov ax, word [esp + 0x1e]
mov dword [esi + 0x64], ecx
mov ecx, dword [esp + 0x14]
mov word [esi + 0xa8], ax
mov eax, dword [esp + 0x44]
mov dword [esi + 0x7c], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esi + 0x4e008], eax
mov eax, dword [esp + 0x20]
mov dword [esi + 0xa4], ecx
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x4e010], eax
xor eax, eax
mov dword [esi + 0x58], edi
mov dword [esi + 0x4e014], ecx
mov ecx, dword [esp + 0x460]
pop edi
pop esi
xor ecx, esp
call fcn.00449662
add esp, 0x45c
ret

Function at 0x42efee
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x1c]
cmp esi, dword [ebp + 0x24]
jbe 0x42effe
push 0xffffffffffffffe6
jmp 0x42f068
push 0
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
test eax, eax
jne 0x42f066
push dword [ebp + 8]
push esi
push 1
push dword [ebp + 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, esi
je 0x42f030
push 0xffffffffffffffe4
jmp 0x42f068
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
test eax, eax
jne 0x42f066
push dword [ebp + 8]
push esi
push 1
push dword [ebp + 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, esi
push 0xffffffffffffffe3
pop ecx
cmovne esi, ecx
mov eax, esi
jmp 0x42f069
push 0xffffffffffffffe5
pop eax
pop esi
pop ebp
ret
Function at 0x431b13
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push 0x459170
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 0x431c45
cmp dword [esi + 4], 0
je 0x431b64
push dword [esi + 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
pop ecx
push dword [ebx*4 + 0x459184]
push dword [esi + 0x50]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov dword [esi + 4], eax
pop ecx
pop ecx
test eax, eax
jne 0x431b9a
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 0x431bd7
push dword [esi + 4]
call sym.wluart.exe_detectBOM
mov dword [esi + 0x18], eax
pop ecx
cmp ebp, 1
jne 0x431bbc
test eax, eax
jne 0x431c1c
mov dword [esi + 0x18], ebp
jmp 0x431c1c
cmp ebp, 3
jne 0x431c1c
push 0x459194
push str.binary
push ebp
push edi
call sym.wluart.exe_luaL_checkoption
mov dword [esi + 0x18], eax
jmp 0x431c19
push 0x459194
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 0x431c07
sub eax, 1
jne 0x431c1c
push dword [esi + 4]
push 1
push 2
push 0x450fec
jmp 0x431c13
push dword [esi + 4]
push 1
push 3
push 0x451168
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [esi + 4], 0
je 0x431c45
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]
mov dword [esi + 0xc], eax
add esp, 0x10
xor eax, eax
inc eax
jmp 0x431c47
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x431c4c
Capabilities:
Write file on windows

Disassembly:
push ecx
push ecx
push esi
mov esi, dword [esp + 0x10]
push edi
push dword [sym.wluart.exe_TFile]
push 1
push esi
call sym.wluart.exe_lua_toself
mov edi, eax
add esp, 0xc
cmp dword [edi + 4], 0
je 0x431d16
push ebx
xor ebx, ebx
push ebp
cmp dword [edi + 0x54], ebx
jne 0x431c87
push str.error:_File_not_opened_for_writing
push esi
call sym.wluart.exe_luaL_error
pop ecx
pop ecx
push 2
pop ebp
cmp dword [edi + 0x18], ebp
jne 0x431cb9
push ebp
push esi
call sym.wluart.exe_lua_isstring
pop ecx
pop ecx
test eax, eax
je 0x431cb9
lea eax, [esp + 0x14]
push eax
push ebp
push esi
call sym.wluart.exe_lua_tolwstring
mov ebp, eax
add esp, 0xc
mov eax, dword [esp + 0x14]
add eax, eax
mov dword [esp + 0x10], eax
jmp 0x431cce
lea eax, [esp + 0x10]
push eax
push ebp
push esi
call sym.wluart.exe_luaL_tolstring
mov ebp, eax
add esp, 0xc
mov eax, dword [esp + 0x10]
test eax, eax
je 0x431cf5
push dword [edi + 4]
sub eax, ebx
push eax
lea eax, [ebx + ebp]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
test eax, eax
je 0x431cf5
add ebx, eax
mov eax, dword [esp + 0x10]
cmp ebx, eax
jb 0x431cd2
cmp dword [edi + 0x18], 2
jne 0x431d03
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
push 0
push ebx
push esi
call sym.wluart.exe_lua_pushinteger
add esp, 0xc
xor eax, eax
inc eax
pop ebp
pop ebx
jmp 0x431d23
push str.error:_File_not_opened_for_writing
push esi
call sym.wluart.exe_luaL_error
pop ecx
pop ecx
pop edi
pop esi
pop ecx
pop ecx
ret
Function at 0x4326b1
Capabilities:
Read file on windows

Disassembly:
push ebp
xor ebp, ebp
push ebp
push ebp
push ebp
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
push dword [esp + 0x18]
push 2
push 1
push 0x459fb8
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov cx, word [0x459fb8]
add esp, 0x20
cmp cl, 0xff
jne 0x4326ed
cmp ch, 0xfe
jne 0x43271b
push 2
pop eax
pop ebp
ret
cmp cl, 0xef
jne 0x43271b
cmp ch, 0xbb
jne 0x43271b
push dword [esp + 8]
push 1
push 1
push 0x459fb8
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp byte [0x459fb8], 0xbf
jne 0x43271b
xor eax, eax
inc eax
pop ebp
ret
push ebp
push ebp
push ebp
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
xor eax, eax
pop ebp
ret

Function at 0x43272f
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0xc]
push edi
push 0
push 0x2000000
push 3
push 0
push 2
push 0x100
push dword [ebx + 0x50]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4327a9
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebx + 0x3c]
push ecx
call esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebx + 0x2c]
push eax
call esi
lea eax, [ebp - 8]
push eax
lea eax, [ebx + 0x1c]
push eax
call esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
pop esi
test eax, eax
jne 0x4327a2
push dword [ebp + 8]
call sym.wluart.exe_lua_error
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
leave
ret

Function at 0x4329e9
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push esi
push edi
push dword [sym.wluart.exe_TFile]
push 1
push dword [esp + 0x14]
call sym.wluart.exe_lua_toself
add esp, 0xc
mov edi, eax
push dword [edi + 0x50]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 2
push dword [esp + 0x10]
mov esi, eax
call sym.wluart.exe_lua_toboolean
mov edx, dword [esp + 0x18]
pop ecx
pop ecx
mov ecx, esi
or ecx, edx
not edx
and edx, esi
test eax, eax
cmovne edx, ecx
push edx
push dword [edi + 0x50]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
xor eax, eax
pop esi
ret

Function at 0x432bb4
Capabilities:
Terminate process

Disassembly:
push esi
push edi
push dword [sym.wluart.exe_TPipe]
push 1
push dword [esp + 0x14]
call sym.wluart.exe_lua_toself
add esp, 0xc
mov edi, eax
push 0xffffffffffffffff
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [edi + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [edi + 8]
call esi
push dword [edi + 0xc]
call esi
push dword [edi + 0x10]
call esi
push dword [edi + 0x14]
call esi
push dword [edi + 0x18]
call esi
push dword [edi + 0x1c]
call esi
push dword [edi + 0x20]
call esi
push 0x30
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
pop edi
pop esi
ret
Function at 0x432dc0
Capabilities:
Read file on windows
Read pipe

Disassembly:
push ecx
push ecx
push ebx
push edi
xor ebx, ebx
lea eax, [esp + 8]
push ebx
push eax
push ebx
push ebx
push ebx
push dword [esp + 0x2c]
xor edi, edi
inc edi
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x432e7f
cmp dword [esp + 8], ebx
je 0x432e7f
push ebp
push esi
push dword [esp + 0x10]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
pop ecx
pop ecx
mov ebp, eax
mov esi, ebx
push ebx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
sub eax, esi
push eax
lea eax, [esi + ebp]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x432e2a
cmp dword [esp + 0x14], ebx
jne 0x432e30
add esi, dword [esp + 0x14]
jmp 0x432e05
push ebx
push ebx
push dword [esp + 0x18]
push ebp
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push edi
call ebx
mov esi, eax
lea eax, [esi + esi]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
pop ecx
push esi
mov edi, eax
push edi
push dword [esp + 0x18]
push ebp
push 0
push 1
call ebx
push 0xffffffffffffffff
push edi
push dword [esp + 0x24]
call sym.wluart.exe_lua_pushlwstring
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push edi
call esi
push ebp
call esi
add esp, 0x14
xor eax, eax
inc eax
pop esi
pop ebp
jmp 0x432e81
xor eax, eax
pop edi
pop ebx
pop ecx
pop ecx
ret
Function at 0x4332f0
Capabilities:
Copy file
Delete directory
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x1d8]
sub esp, 0x258
mov eax, dword [0x459c80]
xor eax, ebp
mov dword [ebp + 0x1d4], eax
mov eax, dword [ebp + 0x1e4]
push ebx
mov ebx, dword [ebp + 0x1e0]
push esi
push edi
push 0x44eb34
push eax
mov dword [ebp - 0x80], eax
call fcn.00425a3c
mov esi, eax
push esi
call fcn.004334e6
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x43343c
lea eax, [ebp - 0x7c]
push eax
push 0x4513a4
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x43341e
mov ecx, 0x4513ac
lea eax, [ebp - 0x50]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x433391
test dx, dx
je 0x43338d
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x433391
add eax, 4
add ecx, 4
test dx, dx
jne 0x43336b
xor eax, eax
jmp 0x433396
sbb eax, eax
or eax, 1
test eax, eax
je 0x43340b
mov ecx, 0x4513b0
lea eax, [ebp - 0x50]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4333c8
test dx, dx
je 0x4333c4
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4333c8
add eax, 4
add ecx, 4
test dx, dx
jne 0x4333a2
xor eax, eax
jmp 0x4333cd
sbb eax, eax
or eax, 1
test eax, eax
je 0x43340b
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x80]
call fcn.00425a3c
test byte [ebp - 0x7c], 0x10
mov esi, eax
pop ecx
pop ecx
lea eax, [ebp - 0x50]
je 0x4333f5
push esi
push eax
call fcn.004332f0
pop ecx
pop ecx
jmp 0x4333ff
push 1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x43343c
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
lea eax, [ebp - 0x7c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x433363
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x44c180
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor eax, eax
inc eax
jmp 0x43343e
xor eax, eax
mov ecx, dword [ebp + 0x1d4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00449662
add ebp, 0x1d8
leave
ret