joyce8/EMBER2024-capa huggingface dataset:
Function at 0x42ee70
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.luart.exe_lua_isstring
add esp, 8
test eax, eax
je 0x42ee96
push 0
push esi
push edi
call sym.luart.exe_lua_tolwstring
add esp, 0xc
jmp 0x42eeb0
push dword [sym.luart.exe_TDirectory]
push esi
push edi
call sym.luart.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.0043ea30
push edi
mov esi, eax
call fcn.0043ecd0
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 0x42f2c0
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 0x42f2fa
lea eax, [edi + 1]
pop edi
pop esi
pop ebp
pop ecx
ret
test ebp, ebp
je 0x42f3f2
push ebx
xor ebx, ebx
cmp edx, 7
jbe 0x42f35d
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 0x42f311
xor ebp, ebp
cmp ebx, edx
jae 0x42f3b2
mov eax, edx
sub eax, ebx
cmp eax, 2
jb 0x42f3a3
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 0x42f380
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x18]
jae 0x42f3ad
jmp 0x42f3a5
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 0x42f303
pop ebx
shl esi, 0x10
pop edi
lea eax, [ecx + esi]
pop esi
pop ebp
pop ecx
ret

Function at 0x42f780
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x42f78d
xor eax, eax
pop esi
ret
mov eax, dword [esp + 8]
push edi
mov edi, dword [esp + 0x14]
not eax
test edi, edi
je 0x42f7d2
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 + 0x452670]
mov ecx, eax
shr eax, 4
and ecx, 0xf
xor edx, ecx
xor eax, dword [edx*4 + 0x452670]
sub edi, 1
jne 0x42f7a0
pop edi
not eax
pop esi
ret
Function at 0x4306a0
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 0x430711
jg 0x4306d8
test ecx, ecx
jb 0x430711
cmp ebx, ecx
jne 0x4306e0
cmp edx, edi
je 0x4306f4
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 0x430711
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 0x439440
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2040
call fcn.0044c680
mov eax, dword [0x45a210]
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 0x43948e
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0044c1d1
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 0x4394dc
pop edi
mov eax, 0xfffffffd
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0044c1d1
add esp, 0x2040
ret
mov ecx, dword [esp + 0x12]
test cl, cl
js 0x4394eb
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 0x439514
or eax, 0x10
mov dword [esi + 0x4e008], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
push ebx
push 0x4523ac
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 0x439559
lea eax, [ebx - 0x10]
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0044c1d1
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 0x43960a
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.0042f780
add esp, 0xc
mov dword [esi + 0x70], eax
test byte [esi + 0x50], 0xf
lea eax, [esp + 0x4c]
jne 0x4395cc
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 0x439602
add dword [esi + 0x78], edi
adc dword [esi + 0x7c], 0
add dword [esi + 0x68], edi
adc dword [esi + 0x6c], 0
jmp 0x4395e8
push 0
push edi
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.004346a0
add esp, 0x10
cmp eax, 1
je 0x4395e8
test eax, eax
jne 0x439602
push ebx
push 0x2000
lea eax, [esp + 0x54]
push 1
push eax
call ebp
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x439580
jmp 0x43960a
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.0044c1d1
add esp, 0x2040
ret
Function at 0x4396b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x45c
mov eax, dword [0x45a210]
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 0x4396f2
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0044c1d1
add esp, 0x45c
ret
cmp dword [esi + 0x14], 1
je 0x439714
pop edi
mov eax, 0xfffffffc
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0044c1d1
add esp, 0x45c
ret
cmp edi, dword [esi + 0x10]
jb 0x439735
pop edi
mov eax, 0xfffffff6
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0044c1d1
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 0x43975e
pop edi
mov eax, 0xfffffff5
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0044c1d1
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 0x43977f
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.00439d70
add esp, 0x10
mov dword [esi + 0x5c], eax
pop ebp
pop ebx
test eax, eax
jne 0x4397b2
pop edi
mov eax, 0xfffffffe
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0044c1d1
add esp, 0x45c
ret
lea eax, [esp + 8]
push eax
push edi
push esi
call fcn.004319c0
add esp, 0xc
test eax, eax
jne 0x4397e1
pop edi
mov eax, 0xfffffffd
pop esi
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0044c1d1
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.0044c1d1
add esp, 0x45c
ret
Function at 0x43cd00
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push 0x45a160
push str.read
push 2
push edi
call sym.luart.exe_luaL_checkoption
push edi
mov ebx, eax
call sym.luart.exe_lua_gettop
push dword [sym.luart.exe_TFile]
mov ebp, eax
push 1
push edi
call sym.luart.exe_lua_toself
mov esi, eax
add esp, 0x20
cmp dword [esi + 0x14], 0
jne 0x43ce3b
mov eax, dword [esi + 4]
test eax, eax
je 0x43cd52
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push dword [ebx*4 + 0x45a174]
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 0x43cd89
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.luart.exe_luaL_error
add esp, 0x10
mov dword [esi + 0x54], ebx
cmp ebx, 2
jge 0x43cdc8
push dword [esi + 4]
call sym.luart.exe_detectBOM
add esp, 4
mov dword [esi + 0x18], eax
cmp ebp, 1
jne 0x43cdad
test eax, eax
jne 0x43ce0d
mov dword [esi + 0x18], ebp
jmp 0x43ce0d
cmp ebp, 3
jne 0x43ce0d
push 0x45a184
push str.binary
push ebp
push edi
call sym.luart.exe_luaL_checkoption
mov dword [esi + 0x18], eax
jmp 0x43ce0a
push 0x45a184
push str.utf8
push 3
push edi
call sym.luart.exe_luaL_checkoption
add esp, 0x10
mov dword [esi + 0x18], eax
sub eax, 1
je 0x43cdf8
sub eax, 1
jne 0x43ce0d
push dword [esi + 4]
push 1
push 2
push 0x453bdc
jmp 0x43ce04
push dword [esi + 4]
push 1
push 3
push 0x453d58
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [esi + 4], 0
je 0x43ce3b
push 1
push edi
call sym.luart.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 0x43dc50
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 0x45a308
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ax, word [0x45a308]
add esp, 0x20
cmp al, 0xff
jne 0x43dc8b
cmp ah, 0xfe
jne 0x43dcb7
mov eax, 2
pop esi
ret
cmp al, 0xef
jne 0x43dcb7
cmp ah, 0xbb
jne 0x43dcb7
push esi
push 1
push 1
push 0x45a308
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp byte [0x45a308], 0xbf
jne 0x43dcb7
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 0x43dcd0
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 0x43dd51
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 0x43dd4a
push dword [esp + 0x24]
call sym.luart.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 0x43dfa0
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebx
push edi
push dword [sym.luart.exe_TFile]
push 1
push dword [esp + 0x14]
call sym.luart.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.luart.exe_lua_toboolean
add esp, 8
test eax, eax
je 0x43dfe8
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 0x43ea30
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 0x43ea60
Capabilities:
Copy file
Delete directory
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
sub esp, 0x258
mov eax, dword [0x45a210]
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 0x451764
push ebp
mov dword [esp + 0x18], edi
call fcn.0042ec70
mov esi, eax
push esi
call fcn.0043ecd0
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 0x43ebb9
lea eax, [esp + 0x14]
push eax
push 0x453f94
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x43eb96
mov ecx, 0x453f9c
lea eax, [esp + 0x40]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x43eb06
test dx, dx
je 0x43eb02
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x43eb06
add eax, 4
add ecx, 4
test dx, dx
jne 0x43eae0
xor eax, eax
jmp 0x43eb0b
sbb eax, eax
or eax, 1
test eax, eax
je 0x43eb82
mov ecx, 0x453fa0
lea eax, [esp + 0x40]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x43eb3e
test dx, dx
je 0x43eb3a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x43eb3e
add eax, 4
add ecx, 4
test dx, dx
jne 0x43eb18
xor eax, eax
jmp 0x43eb43
sbb eax, eax
or eax, 1
test eax, eax
je 0x43eb82
lea eax, [esp + 0x40]
push eax
push ebp
call fcn.0042ec70
add esp, 8
mov esi, eax
test byte [esp + 0x14], 0x10
lea eax, [esp + 0x40]
je 0x43eb6e
push esi
push eax
call fcn.0043ea60
add esp, 8
jmp 0x43eb78
push 1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x43ebb9
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 0x43ead3
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x44ed90
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov eax, 1
jmp 0x43ebbb
xor eax, eax
mov ecx, dword [esp + 0x264]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044c1d1
add esp, 0x258
ret
Function at 0x43ecd0
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 0x43ed10
xor ecx, ecx
mov esi, eax
cmp si, 0x2f
jne 0x43ed01
mov word [ecx + edi], bp
inc edx
lea ecx, [edx + edx]
movzx eax, word [ecx + ebx]
mov esi, eax
test ax, ax
jne 0x43ecf7
push 0x5c
push edi
mov dword [esp + 0x1c], 1
call sub.VCRUNTIME140.dll_wcschr
mov esi, eax
add esp, 8
test esi, esi
je 0x43ed8d
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 0x43ed52
push eax
push edi
call ebx
test eax, eax
jne 0x43ed52
call ebp
cmp eax, 0xb7
jne 0x43ed85
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 0x43ed35
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 0x43eda0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
sub esp, 0x254
mov eax, dword [0x45a210]
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 0x43eebe
lea eax, [esp + 0x10]
push eax
push 0x453f94
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x43eea3
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
nop word [eax + eax]
mov ecx, 0x453f9c
lea eax, [esp + 0x3c]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x43ee36
test dx, dx
je 0x43ee32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x43ee36
add eax, 4
add ecx, 4
test dx, dx
jne 0x43ee10
xor eax, eax
jmp 0x43ee3b
sbb eax, eax
or eax, 1
test eax, eax
je 0x43ee93
mov eax, 0x453fa0
lea ecx, [esp + 0x3c]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x43ee6e
test dx, dx
je 0x43ee6a
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x43ee6e
add ecx, 4
add eax, 4
test dx, dx
jne 0x43ee48
xor eax, eax
jmp 0x43ee73
sbb eax, eax
or eax, 1
test eax, eax
je 0x43ee93
test byte [esp + 0x10], 0x10
lea eax, [esp + 0x3c]
push eax
je 0x43ee8d
call fcn.0043eda0
add esp, 4
jmp 0x43ee8f
call edi
test eax, eax
je 0x43eebe
lea eax, [esp + 0x10]
push eax
push esi
call ebx
test eax, eax
jne 0x43ee00
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x44ed90
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x43eec0
xor eax, eax
mov ecx, dword [esp + 0x260]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044c1d1
add esp, 0x254
ret
Function at 0x440eb0
Capabilities:
Delete file

Disassembly:
push edi
mov edi, dword [esp + 8]
push str.DLL_binary_modules
push 0xfff0b9d8
push edi
call sym.luart.exe_lua_getfield
add esp, 0xc
test eax, eax
je 0x440f2e
push edi
call sym.luart.exe_lua_pushnil
push 0xfffffffffffffffe
push edi
call sym.luart.exe_lua_next
add esp, 0xc
test eax, eax
je 0x440f2e
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.luart.exe_lua_tolwstring
push 0xffffffffffffffff
push edi
mov esi, eax
call sym.luart.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.luart.exe_lua_settop
push 0xfffffffffffffffe
push edi
call sym.luart.exe_lua_next
add esp, 0x14
test eax, eax
jne 0x440ef0
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
ret
Function at 0x440f40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 8
cmp dword [0x45a30c], 0
jne 0x4410af
push ebx
push esi
push edi
push 0xa
push 0x64
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0
mov dword [0x45a30c], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, dword [0x45a30c]
mov ebx, eax
test edi, edi
je 0x440ff0
cmp ebx, 2
jbe 0x440ff0
push 0x4e018
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov esi, eax
lea eax, [esp + 0xc]
push eax
push 4
push 1
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x440fcb
lea eax, [esp + 0x10]
mov byte [edi], 0x50
push eax
push dword [esp + 0x10]
push 1
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x806
push ebx
push edi
push esi
mov dword [esi + 0x50], 6
call fcn.00431dc0
add esp, 0x10
test eax, eax
jne 0x441003
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
pop edi
pop esi
mov dword [0x45a2ec], 0
xor eax, eax
pop ebx
add esp, 8
ret
mov dword [0x45a2ec], esi
test esi, esi
je 0x440ff0
mov ebx, dword [esp + 0x18]
push str.package
push ebx
call sym.luart.exe_lua_getglobal
push str.searchers
push 0xffffffffffffffff
push ebx
call sym.luart.exe_lua_getfield
push 0xffffffffffffffff
push ebx
call sym.luart.exe_luaL_len
push 0xfffffffffffffffe
push ebx
mov edi, eax
mov esi, edx
call sym.luart.exe_lua_pushvalue
push 1
push 0x4413b0
push ebx
call sym.luart.exe_lua_pushcclosure
add edi, 1
adc esi, 0
push esi
push edi
push 0xfffffffffffffffe
push ebx
call sym.luart.exe_lua_rawseti
add esp, 0x40
push 0xfffffffffffffffe
push ebx
call sym.luart.exe_lua_pushvalue
push 1
push 0x441170
push ebx
call sym.luart.exe_lua_pushcclosure
add edi, 1
adc esi, 0
push esi
push edi
push 0xfffffffffffffffe
push ebx
call sym.luart.exe_lua_rawseti
push 0xfffffffffffffffd
push ebx
call sym.luart.exe_lua_settop
add esp, 0x2c
push 0x1000
call dword [sym.imp.KERNEL32.dll_SetDefaultDllDirectories]
push 0x45aaa0
call dword [sym.imp.KERNEL32.dll_AddDllDirectory]
mov eax, dword [0x45a2ec]
pop edi
pop esi
pop ebx
add esp, 8
ret
mov eax, dword [0x45a2ec]
add esp, 8
ret
Function at 0x443b70
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x98
mov eax, dword [0x45a210]
xor eax, esp
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xa0]
lea ecx, [esp]
push ebx
mov ebx, dword [esp + 0xa8]
push esi
push edi
mov edi, dword [esp + 0xa8]
push 0
push ecx
push 0
push 0
push ebx
push eax
call sub.DNSAPI.dll_DnsQuery_A
mov esi, eax
test esi, esi
jne 0x443c2b
cmp bx, 1
jne 0x443bc9
mov eax, dword [esp + 0xc]
push dword [eax + 0x18]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
jmp 0x443c14
cmp bx, 0x1c
jne 0x443c0d
push 0x80
lea eax, [esp + 0x24]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x18]
add esp, 0xc
movups xmm0, xmmword [eax + 0x18]
push 0x80
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x18]
push eax
push 0x17
movups xmmword [esp + 0x20], xmm0
call sub.WS2_32.dll_inet_ntop
lea eax, [esp + 0x20]
push eax
jmp 0x443c14
mov eax, dword [esp + 0xc]
push dword [eax + 0x18]
push edi
call dword [0x4556a4]
add esp, 8
push 1
push dword [esp + 0x10]
call sub.DNSAPI.dll_DnsFree
jmp 0x443c62
cmp esi, 0x251d
je 0x443c58
cmp esi, 0x25e5
je 0x443c58
cmp esi, 0x232b
je 0x443c58
push 0
push edi
call dword [0x4556a8]
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x443c62
push edi
call dword [0x455698]
add esp, 4
mov ecx, dword [esp + 0xa0]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0044c1d1
add esp, 0x98
ret