joyce8/EMBER2024-capa huggingface dataset:
Function at 0x42c4a0
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_static.exe_lua_gettop
mov edi, dword [ebp + 0x10]
add esp, 4
sub eax, edi
je 0x42c57e
dec eax
push edi
push ebx
mov dword [esp + 0x44], eax
call sym.wluart_static.exe_lua_type
add esp, 8
cmp eax, 3
jne 0x42c54b
push edi
push ebx
call sym.wluart_static.exe_lua_isinteger
add esp, 8
push 0
push edi
push ebx
test eax, eax
je 0x42c507
call sym.wluart_static.exe_lua_tointegerx
push edx
push eax
push str._lld
push dword [ebp + 0xc]
call fcn.0041cc60
add esp, 0x1c
jmp 0x42c522
call sym.wluart_static.exe_lua_tonumberx
add esp, 4
fstp qword [esp]
push str._.14g
push dword [ebp + 0xc]
call fcn.0041cc60
add esp, 0x10
test esi, esi
je 0x42c52a
test eax, eax
jg 0x42c577
xor esi, esi
mov eax, dword [esp + 0x3c]
inc edi
test eax, eax
jne 0x42c4c8
test esi, esi
jne 0x42c57e
push esi
push esi
push ebx
call sym.wluart_static.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_static.exe_luaL_checklstring
add esp, 0xc
test esi, esi
je 0x42c52a
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 0x42c52a
mov esi, 1
jmp 0x42c52c
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x42f200
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 0x42f21f
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x42f214
sub ebx, ecx
jmp 0x42f221
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_static.exe_zip_entry_openbyindex
inc edi
add esp, 8
mov dword [esp + 0x20], edi
test eax, eax
jne 0x42f365
push esi
call sym.wluart_static.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 0x42f260
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 0x42f298
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 0x42f32f
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.0043ad70
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 0x42f303
lea ebx, [ecx + 0x5c]
cmp word [edi + esi*2], 0x2f
jne 0x42f2fa
xor eax, eax
push edi
mov word [edi + esi*2], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x42f2f2
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 0x42f2d0
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x28]
push esi
call sym.wluart_static.exe_zip_entry_isdir
add esp, 4
test eax, eax
jne 0x42f323
push edi
push esi
call sym.wluart_static.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 0x42f333
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_static.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 0x42f232
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 0x42f3a0
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_static.exe_lua_isstring
add esp, 8
test eax, eax
je 0x42f3c6
push 0
push esi
push edi
call sym.wluart_static.exe_lua_tolwstring
add esp, 0xc
jmp 0x42f3e0
push dword [sym.wluart_static.exe_TDirectory]
push esi
push edi
call sym.wluart_static.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.0043ef70
push edi
mov esi, eax
call fcn.0043f220
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 0x42f7f0
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 0x42f82a
lea eax, [edi + 1]
pop edi
pop esi
pop ebp
pop ecx
ret
test ebp, ebp
je 0x42f922
push ebx
xor ebx, ebx
cmp edx, 7
jbe 0x42f88d
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 0x42f841
xor ebp, ebp
cmp ebx, edx
jae 0x42f8e2
mov eax, edx
sub eax, ebx
cmp eax, 2
jb 0x42f8d3
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 0x42f8b0
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x18]
jae 0x42f8dd
jmp 0x42f8d5
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 0x42f833
pop ebx
shl esi, 0x10
pop edi
lea eax, [ecx + esi]
pop esi
pop ebp
pop ecx
ret

Function at 0x42fcb0
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x42fcbd
xor eax, eax
pop esi
ret
mov eax, dword [esp + 8]
push edi
mov edi, dword [esp + 0x14]
not eax
test edi, edi
je 0x42fd02
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 + 0x465b10]
mov ecx, eax
shr eax, 4
and ecx, 0xf
xor edx, ecx
xor eax, dword [edx*4 + 0x465b10]
sub edi, 1
jne 0x42fcd0
pop edi
not eax
pop esi
ret
Function at 0x439970
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2040
call fcn.0045f960
mov eax, dword [0x470d10]
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 0x4399be
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0045f421
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 0x439a0c
pop edi
mov eax, 0xfffffffd
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0045f421
add esp, 0x2040
ret
mov ecx, dword [esp + 0x12]
test cl, cl
js 0x439a1b
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 0x439a44
or eax, 0x10
mov dword [esi + 0x4e008], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
push ebx
push 0x46584c
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 0x439a89
lea eax, [ebx - 0x10]
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0045f421
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 0x439b3a
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.0042fcb0
add esp, 0xc
mov dword [esi + 0x70], eax
test byte [esi + 0x50], 0xf
lea eax, [esp + 0x4c]
jne 0x439afc
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 0x439b32
add dword [esi + 0x78], edi
adc dword [esi + 0x7c], 0
add dword [esi + 0x68], edi
adc dword [esi + 0x6c], 0
jmp 0x439b18
push 0
push edi
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.00434bd0
add esp, 0x10
cmp eax, 1
je 0x439b18
test eax, eax
jne 0x439b32
push ebx
push 0x2000
lea eax, [esp + 0x54]
push 1
push eax
call ebp
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x439ab0
jmp 0x439b3a
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.0045f421
add esp, 0x2040
ret
Function at 0x439be0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x45c
mov eax, dword [0x470d10]
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 0x439c22
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f421
add esp, 0x45c
ret
cmp dword [esi + 0x14], 1
je 0x439c44
pop edi
mov eax, 0xfffffffc
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f421
add esp, 0x45c
ret
cmp edi, dword [esi + 0x10]
jb 0x439c65
pop edi
mov eax, 0xfffffff6
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f421
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 0x439c8e
pop edi
mov eax, 0xfffffff5
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f421
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 0x439caf
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.0043a2a0
add esp, 0x10
mov dword [esi + 0x5c], eax
pop ebp
pop ebx
test eax, eax
jne 0x439ce2
pop edi
mov eax, 0xfffffffe
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f421
add esp, 0x45c
ret
lea eax, [esp + 8]
push eax
push edi
push esi
call fcn.00431ef0
add esp, 0xc
test eax, eax
jne 0x439d11
pop edi
mov eax, 0xfffffffd
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0045f421
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.0045f421
add esp, 0x45c
ret
Function at 0x43d240
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push 0x470180
push str.read
push 2
push edi
call sym.wluart_static.exe_luaL_checkoption
push edi
mov ebx, eax
call sym.wluart_static.exe_lua_gettop
push dword [sym.wluart_static.exe_TFile]
mov ebp, eax
push 1
push edi
call sym.wluart_static.exe_lua_toself
mov esi, eax
add esp, 0x20
cmp dword [esi + 0x14], 0
jne 0x43d37b
mov eax, dword [esi + 4]
test eax, eax
je 0x43d292
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push dword [ebx*4 + 0x470194]
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 0x43d2c9
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_static.exe_luaL_error
add esp, 0x10
mov dword [esi + 0x54], ebx
cmp ebx, 2
jge 0x43d308
push dword [esi + 4]
call sym.wluart_static.exe_detectBOM
add esp, 4
mov dword [esi + 0x18], eax
cmp ebp, 1
jne 0x43d2ed
test eax, eax
jne 0x43d34d
mov dword [esi + 0x18], ebp
jmp 0x43d34d
cmp ebp, 3
jne 0x43d34d
push 0x4701a4
push str.binary
push ebp
push edi
call sym.wluart_static.exe_luaL_checkoption
mov dword [esi + 0x18], eax
jmp 0x43d34a
push 0x4701a4
push str.utf8
push 3
push edi
call sym.wluart_static.exe_luaL_checkoption
add esp, 0x10
mov dword [esi + 0x18], eax
sub eax, 1
je 0x43d338
sub eax, 1
jne 0x43d34d
push dword [esi + 4]
push 1
push 2
push 0x46707c
jmp 0x43d344
push dword [esi + 4]
push 1
push 3
push 0x4671f8
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [esi + 4], 0
je 0x43d37b
push 1
push edi
call sym.wluart_static.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
Function at 0x43e190
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push 0
push 0
push 0
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
push esi
push 2
push 1
push 0x471018
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ax, word [0x471018]
add esp, 0x20
cmp al, 0xff
jne 0x43e1cb
cmp ah, 0xfe
jne 0x43e1f7
mov eax, 2
pop esi
ret
cmp al, 0xef
jne 0x43e1f7
cmp ah, 0xbb
jne 0x43e1f7
push esi
push 1
push 1
push 0x471018
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp byte [0x471018], 0xbf
jne 0x43e1f7
mov eax, 1
pop esi
ret
push 0
push 0
push 0
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
xor eax, eax
pop esi
ret

Function at 0x43e210
Capabilities:
Timestomp file

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x24]
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 0x43e291
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [esp + 0x1c]
push eax
lea ecx, [ebx + 0x3c]
push ecx
call esi
lea eax, [esp + 0x14]
push eax
lea eax, [ebx + 0x2c]
push eax
call esi
lea eax, [esp + 0xc]
push eax
lea eax, [ebx + 0x1c]
push eax
call esi
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
pop esi
test eax, eax
jne 0x43e28a
push dword [esp + 0x24]
call sym.wluart_static.exe_lua_error
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
add esp, 0x18
ret

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

Disassembly:
push ebx
push edi
push dword [sym.wluart_static.exe_TFile]
push 1
push dword [esp + 0x14]
call sym.wluart_static.exe_lua_toself
add esp, 0xc
mov ebx, eax
push dword [ebx + 0x50]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 2
push dword [esp + 0x10]
mov edi, eax
call sym.wluart_static.exe_lua_toboolean
add esp, 8
test eax, eax
je 0x43e528
or edi, dword [esp + 0x10]
push edi
push dword [ebx + 0x50]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
xor eax, eax
pop ebx
ret
mov eax, dword [esp + 0x10]
not eax
and edi, eax
push edi
push dword [ebx + 0x50]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
xor eax, eax
pop ebx
ret

Function at 0x43ef70
Capabilities:
Get common file path

Disassembly:
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edi, [eax + 1]
lea ecx, [edi + edi]
push ecx
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
pop edi
mov eax, esi
pop esi
ret
Function at 0x43efb0
Capabilities:
Copy file
Delete directory
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
sub esp, 0x258
mov eax, dword [0x470d10]
xor eax, esp
mov dword [esp + 0x254], eax
push ebx
push ebp
mov ebp, dword [esp + 0x268]
push esi
push edi
mov edi, dword [esp + 0x26c]
push 0x464c0c
push ebp
mov dword [esp + 0x18], edi
call fcn.0042f1a0
mov esi, eax
push esi
call fcn.0043f220
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
call ebx
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x43f109
lea eax, [esp + 0x14]
push eax
push 0x467434
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x43f0e6
mov ecx, 0x46743c
lea eax, [esp + 0x40]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x43f056
test dx, dx
je 0x43f052
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x43f056
add eax, 4
add ecx, 4
test dx, dx
jne 0x43f030
xor eax, eax
jmp 0x43f05b
sbb eax, eax
or eax, 1
test eax, eax
je 0x43f0d2
mov ecx, 0x467440
lea eax, [esp + 0x40]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x43f08e
test dx, dx
je 0x43f08a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x43f08e
add eax, 4
add ecx, 4
test dx, dx
jne 0x43f068
xor eax, eax
jmp 0x43f093
sbb eax, eax
or eax, 1
test eax, eax
je 0x43f0d2
lea eax, [esp + 0x40]
push eax
push ebp
call fcn.0042f1a0
add esp, 8
mov esi, eax
test byte [esp + 0x14], 0x10
lea eax, [esp + 0x40]
je 0x43f0be
push esi
push eax
call fcn.0043efb0
add esp, 8
jmp 0x43f0c8
push 1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x43f109
push esi
call ebx
add esp, 4
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x43f023
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x462248
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov eax, 1
jmp 0x43f10b
xor eax, eax
mov ecx, dword [esp + 0x264]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045f421
add esp, 0x258
ret
Function at 0x43f220
Capabilities:
Create directory

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
movzx ecx, word [ebx]
xor edx, edx
add esp, 4
mov edi, eax
mov eax, ecx
lea ebp, [edx + 0x5c]
test cx, cx
je 0x43f260
xor ecx, ecx
mov esi, eax
cmp si, 0x2f
jne 0x43f251
mov word [ecx + edi], bp
inc edx
lea ecx, [edx + edx]
movzx eax, word [ecx + ebx]
mov esi, eax
test ax, ax
jne 0x43f247
push 0x5c
push edi
mov dword [esp + 0x1c], 1
call sub.VCRUNTIME140.dll_wcschr
mov esi, eax
add esp, 8
test esi, esi
je 0x43f2dd
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
cmp word [esi - 2], 0x3a
mov word [esi], ax
je 0x43f2a2
push eax
push edi
call ebx
test eax, eax
jne 0x43f2a2
call ebp
cmp eax, 0xb7
jne 0x43f2d5
mov eax, 0x5c
mov word [esi], ax
sub esi, edi
sar esi, 1
inc esi
push eax
lea eax, [edi + esi*2]
push eax
call sub.VCRUNTIME140.dll_wcschr
mov esi, eax
add esp, 8
test esi, esi
jne 0x43f285
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [esp + 0x14], 0
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret

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

Disassembly:
sub esp, 0x254
mov eax, dword [0x470d10]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
push ebp
mov ebp, dword [esp + 0x260]
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x43f40e
lea eax, [esp + 0x10]
push eax
push 0x467434
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x43f3f3
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
nop word [eax + eax]
mov ecx, 0x46743c
lea eax, [esp + 0x3c]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x43f386
test dx, dx
je 0x43f382
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x43f386
add eax, 4
add ecx, 4
test dx, dx
jne 0x43f360
xor eax, eax
jmp 0x43f38b
sbb eax, eax
or eax, 1
test eax, eax
je 0x43f3e3
mov eax, 0x467440
lea ecx, [esp + 0x3c]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x43f3be
test dx, dx
je 0x43f3ba
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x43f3be
add ecx, 4
add eax, 4
test dx, dx
jne 0x43f398
xor eax, eax
jmp 0x43f3c3
sbb eax, eax
or eax, 1
test eax, eax
je 0x43f3e3
test byte [esp + 0x10], 0x10
lea eax, [esp + 0x3c]
push eax
je 0x43f3dd
call fcn.0043f2f0
add esp, 4
jmp 0x43f3df
call edi
test eax, eax
je 0x43f40e
lea eax, [esp + 0x10]
push eax
push esi
call ebx
test eax, eax
jne 0x43f350
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x462248
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x43f410
xor eax, eax
mov ecx, dword [esp + 0x260]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045f421
add esp, 0x254
ret
Function at 0x441420
Capabilities:
Delete file

Disassembly:
push edi
mov edi, dword [esp + 8]
push str.DLL_binary_modules
push 0xfff0b9d8
push edi
call sym.wluart_static.exe_lua_getfield
add esp, 0xc
test eax, eax
je 0x44149e
push edi
call sym.wluart_static.exe_lua_pushnil
push 0xfffffffffffffffe
push edi
call sym.wluart_static.exe_lua_next
add esp, 0xc
test eax, eax
je 0x44149e
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
push 0
push 0xfffffffffffffffe
push edi
call sym.wluart_static.exe_lua_tolwstring
push 0xffffffffffffffff
push edi
mov esi, eax
call sym.wluart_static.exe_lua_touserdata
add esp, 0x14
push eax
call ebx
push esi
call ebp
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push 0xfffffffffffffffe
push edi
call sym.wluart_static.exe_lua_settop
push 0xfffffffffffffffe
push edi
call sym.wluart_static.exe_lua_next
add esp, 0x14
test eax, eax
jne 0x441460
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
ret