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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x818038]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test edi, edi
je 0x402c03
test esi, esi
je 0x402c03
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402b10
sub ecx, edx
xor eax, eax
sar ecx, 1
je 0x402c05
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00409200
add esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x402b7f
cmp dword [0x818f08], 3
jne 0x402b7f
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [0x812020]
push 0x816a9c
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004057bb
add esp, 0xc
jmp 0x402b91
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [0x81201c]
push esi
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004057bb
push 0x816aa0
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push eax
mov dword [ebp - 0x210], 0
call fcn.004059b2
mov eax, dword [ebp - 0x210]
add esp, 0x18
test eax, eax
je 0x402c03
push eax
push 1
push 0x200
push edi
call fcn.00405c84
push dword [ebp - 0x210]
call fcn.00405d9c
add esp, 0x14
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040561a
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040561a
mov esp, ebp
pop ebp
ret

Function at 0x402cc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x818038]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
xor edx, edx
jmp 0x402ce0
not byte [esi + edx]
inc edx
cmp edx, 0x200
jb 0x402ce0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00409200
add esp, 0xc
mov dword [ebp - 0x214], 0
test esi, esi
je 0x402d95
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [0x81201c]
push 0x816ac0
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.004057bb
push 0x816adc
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.004059b2
mov eax, dword [ebp - 0x214]
add esp, 0x18
test eax, eax
je 0x402d81
push eax
push 1
push 0x200
push esi
call fcn.00405f6a
push dword [ebp - 0x214]
call fcn.00405d9c
add esp, 0x14
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040561a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0040561a
mov esp, ebp
pop ebp
ret
Function at 0x403fe0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x818038]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
push 0x816ce8
push ecx
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], 0
call fcn.004059b2
add esp, 0xc
test eax, eax
je 0x404025
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040561a
mov esp, ebp
pop ebp
ret
push ebx
push esi
push 2
push 0
push dword [ebp - 8]
call fcn.00406780
push dword [ebp - 8]
call fcn.00406b58
push 0
push 0
push dword [ebp - 8]
mov esi, eax
call fcn.00406780
lea eax, [edi + esi]
push eax
mov dword [ebp - 0x10], eax
call fcn.00406627
push dword [ebp - 8]
mov ebx, eax
push 1
push esi
push ebx
mov dword [ebp - 0x14], ebx
call fcn.00405c84
push dword [ebp - 8]
call fcn.00405d9c
push edi
add ebx, esi
push 0
push ebx
call fcn.00409200
mov eax, edi
cdq
and edx, 3
add esp, 0x40
lea edi, [edx + eax]
sar edi, 2
call dword [0x81202c]
push eax
call fcn.00406be3
add esp, 4
xor esi, esi
test edi, edi
jle 0x4040ad
lea ecx, [ecx]
call fcn.00406bc0
mov dword [ebx + esi*4], eax
inc esi
cmp esi, edi
jl 0x4040a0
push 0x816cf0
push dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
call fcn.004059b2
add esp, 0xc
test eax, eax
je 0x4040d8
pop esi
pop ebx
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040561a
mov esp, ebp
pop ebp
ret
push dword [ebp - 8]
mov esi, dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
push esi
call fcn.00405f6a
push dword [ebp - 8]
call fcn.00405d9c
add esp, 0x14
test esi, esi
je 0x404101
push esi
call fcn.004066b9
add esp, 4
mov ecx, dword [ebp - 4]
pop esi
pop ebx
xor ecx, ebp
mov eax, 1
pop edi
call fcn.0040561a
mov esp, ebp
pop ebp
ret
Function at 0x404120
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0x818038]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x103
lea eax, [ebp - 0x20b]
push 0
push eax
mov byte [ebp - 0x20c], 0
call fcn.00409200
push 0x103
lea eax, [ebp - 0x107]
push 0
push eax
mov byte [ebp - 0x108], 0
call fcn.00409200
push 0x103
lea eax, [ebp - 0x30f]
push 0
push eax
mov byte [ebp - 0x310], 0
call fcn.00409200
mov ax, word [0x816d00]
movq xmm0, qword [0x816cf8]
mov word [ebp - 0x31c], ax
mov al, byte [0x816d02]
add esp, 0x24
mov byte [ebp - 0x31a], al
lea eax, [ebp - 0x20c]
movq qword [ebp - 0x324], xmm0
push eax
xorps xmm0, xmm0
push 0x104
movq qword [ebp - 0x319], xmm0
mov byte [ebp - 0x311], 0
call dword [0x812040]
lea edx, [ebp - 0x324]
mov esi, edx
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x4041e0
push edi
lea edi, [ebp - 0x20c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4041f1
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x104
lea eax, [ebp - 0x108]
mov ecx, edx
push eax
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
call dword [0x812044]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x310]
push 0x104
push eax
call fcn.00406bf3
lea eax, [ebp - 0x310]
push 0x5c
push eax
call fcn.004064f0
add esp, 0x14
pop edi
test eax, eax
je 0x40424c
mov byte [eax], 0
lea eax, [ebp - 0x20c]
push 0x816d04
push eax
call fcn.00406d0c
mov esi, eax
add esp, 8
test esi, esi
je 0x4043ae
push esi
push 1
push 9
push 0x816d08
call fcn.00405f6a
push esi
push 1
push 5
push 0x816d14
call fcn.00405f6a
lea ecx, [ebp - 0x108]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404294
push esi
sub ecx, edx
push 1
push ecx
lea eax, [ebp - 0x108]
push eax
call fcn.00405f6a
push esi
push 1
push 2
push 0x816d1c
call fcn.00405f6a
push esi
push 1
push 0xa
push 0x816d20
call fcn.00405f6a
lea ecx, [ebp - 0x108]
add esp, 0x30
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4042d7
push esi
sub ecx, edx
push 1
push ecx
lea eax, [ebp - 0x108]
push eax
call fcn.00405f6a
push esi
push 1
push 0xf
push 0x816d2c
call fcn.00405f6a
push esi
push 1
push 7
push 0x816d3c
call fcn.00405f6a
lea ecx, [ebp - 0x310]
add esp, 0x30
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404320
push esi
sub ecx, edx
push 1
push ecx
lea eax, [ebp - 0x310]
push eax
call fcn.00405f6a
push esi
push 1
push 3
push 0x816d44
call fcn.00405f6a
push esi
push 1
push 5
push 0x816d48
call fcn.00405f6a
lea ecx, [ebp - 0x20c]
add esp, 0x30
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404363
push esi
sub ecx, edx
push 1
push ecx
lea eax, [ebp - 0x20c]
push eax
call fcn.00405f6a
push esi
push 1
push 1
push 0x816d50
call fcn.00405f6a
push esi
call fcn.00405d9c
add esp, 0x24
lea eax, [ebp - 0x20c]
push 0
push 0
push 0
push eax
push 0x816d54
push 0
call dword [0x812164]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040561a
mov esp, ebp
pop ebp
ret
Function at 0x4054f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.0040c400
mov eax, dword [0x818038]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
push edi
push 4
mov esi, ecx
lea eax, [ebp - 0x1008]
push eax
push dword [esi]
mov ebx, edx
mov dword [ebp - 0x100c], esi
call dword [0x8121d4]
cmp eax, 4
je 0x405540
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040561a
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1008], edi
jbe 0x405590
jmp fcn.00405550
Function at 0x433005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
mov eax, section..text
nop
nop
push 4
nop
nop
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x433072
mov ebx, 0x40de38
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x5df4280b
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x433060
nop
nop
nop
mov eax, section..data
nop
cmp eax, 0
nop
nop
nop
je 0x4330d2
nop
nop
nop
nop
nop
mov ebx, 0x4304d8
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x158f5a88
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x4330c0
nop
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x40b3be
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x1c
push esi
push edi
call dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_localeconv]
mov ecx, dword [esp + 0x28]
xorps xmm1, xmm1
movsd qword [esp + 8], xmm1
mov eax, dword [eax]
movsx eax, byte [eax]
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
mov edi, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
mov dword [eax], ecx
movzx eax, byte [ecx]
test byte [eax + 0x44bc61], 8
je 0x40b412
inc ecx
movzx eax, byte [ecx]
test byte [eax + 0x44bc61], 8
jne 0x40b401
mov dword [esp + 0x28], ecx
lea eax, [esp + 0x28]
push eax
call fcn.0040ab01
mov esi, dword [esp + 0x2c]
pop ecx
mov dword [esp + 0x10], eax
cmp byte [esi], 0x30
jne 0x40b55f
mov cl, byte [esi + 1]
cmp cl, 0x78
je 0x40b43f
cmp cl, 0x58
jne 0x40b55f
mov eax, dword [esp + 0x1c]
add esi, 2
mov cl, byte [esi]
movsx edx, cl
cmp edx, eax
jne 0x40b460
cmp dword [esp + 0x20], 0
jne 0x40b4c2
mov dword [esp + 0x20], 1
jmp 0x40b4bf
movzx eax, cl
test byte [eax + 0x44bc61], 0x10
je 0x40b4c2
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40b47f
cmp cl, 0x30
jne 0x40b47f
inc dword [esp + 0x14]
jmp 0x40b4b3
inc eax
mov dword [esp + 0x18], eax
cmp eax, 0x1e
jg 0x40b4b2
push edx
call fcn.0040aef4
movsd xmm1, qword [esp + 0xc]
mulsd xmm1, qword [0x44c508]
pop ecx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
movsd qword [esp + 8], xmm1
jmp 0x40b4b3
inc edi
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x1c]
je 0x40b4bf
dec edi
inc esi
jmp 0x40b446
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add eax, ecx
je 0x40b55f
mov eax, dword [esp + 0x2c]
shl edi, 2
mov dword [eax], esi
mov al, byte [esi]
cmp al, 0x70
je 0x40b4e5
cmp al, 0x50
jne 0x40b53e
lea eax, [esp + 0x28]
inc esi
push eax
mov dword [esp + 0x2c], esi
call fcn.0040ab01
mov edx, dword [esp + 0x2c]
mov esi, eax
pop ecx
mov al, byte [edx]
movzx ecx, al
test byte [ecx + 0x44bc61], 2
je 0x40b55f
xor ecx, ecx
imul ecx, ecx, 0xa
movsx eax, al
add ecx, 0xffffffd0
add ecx, eax
inc edx
mov al, byte [edx]
mov byte [esp + 0x2b], al
movzx eax, al
test byte [eax + 0x44bc61], 2
mov al, byte [esp + 0x2b]
jne 0x40b50b
mov eax, ecx
neg eax
test esi, esi
cmove eax, ecx
add edi, eax
mov eax, dword [esp + 0x2c]
mov dword [eax], edx
cmp dword [esp + 0x10], 0
je 0x40b54c
xorps xmm1, xmmword [0x44c510]
push edi
push ecx
push ecx
movsd qword [esp], xmm1
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_ldexp]
add esp, 0xc
jmp 0x40b561
fldz
pop edi
pop esi
add esp, 0x1c
ret

Function at 0x40e6a8
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, edi
xor esi, dword [esp + 0x14]
test edi, edi
je 0x40e6d8
push ebx
mov ebx, dword [esp + 0x10]
movzx edx, byte [ebx + edi - 1]
mov eax, esi
shl eax, 5
mov ecx, esi
add edx, eax
shr ecx, 2
add edx, ecx
xor esi, edx
sub edi, 1
jne 0x40e6bd
pop ebx
pop edi
mov eax, esi
pop esi
ret
Function at 0x41b95f
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x21c
mov eax, dword [0x459c80]
xor eax, esp
mov dword [esp + 0x218], eax
mov eax, dword [esp + 0x224]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x234]
push edi
mov edi, dword [esp + 0x230]
push str._5_4
push esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x244]
push 0x44db88
push edi
mov dword [esp + 0x20], eax
call sym.wluart.exe_lua_pushfstring
mov ebp, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
push eax
call ebp
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x41b9cc
push esi
call ebp
mov ebx, eax
pop ecx
test ebx, ebx
je 0x41bad2
push str.LUA_NOENV
push 0xfff0b9d8
push edi
call sym.wluart.exe_lua_getfield
push 0xffffffffffffffff
push edi
call sym.wluart.exe_lua_toboolean
push 0xfffffffffffffffe
push edi
mov esi, eax
call sym.wluart.exe_lua_settop
add esp, 0x1c
test esi, esi
jne 0x41bad2
push 0x44db90
push ebx
call sub.VCRUNTIME140.dll_strstr
mov ebp, eax
pop ecx
pop ecx
test ebp, ebp
jne 0x41ba12
push ebx
jmp 0x41bad6
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x41ba17
lea eax, [esp + 0x18]
sub esi, ecx
push eax
push edi
call sym.wluart.exe_luaL_buffinit
pop ecx
pop ecx
cmp ebx, ebp
jae 0x41ba6c
mov eax, ebp
sub eax, ebx
push eax
lea eax, [esp + 0x1c]
push ebx
push eax
call sym.wluart.exe_luaL_addlstring
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp ecx, dword [esp + 0x1c]
jb 0x41ba60
lea eax, [esp + 0x18]
push 1
push eax
call sym.wluart.exe_luaL_prepbuffsize
pop ecx
pop ecx
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov byte [eax + ecx], 0x3b
inc dword [esp + 0x20]
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
call sym.wluart.exe_luaL_addstring
lea eax, [ebx - 2]
add eax, esi
pop ecx
pop ecx
cmp ebp, eax
jae 0x41bac6
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x1c]
jb 0x41baa1
lea eax, [esp + 0x18]
push 1
push eax
call sym.wluart.exe_luaL_prepbuffsize
pop ecx
pop ecx
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
sub esi, ebp
mov byte [eax + ecx], 0x3b
lea eax, [esi - 2]
inc dword [esp + 0x20]
add eax, ebx
push eax
lea eax, [ebp + 2]
push eax
lea eax, [esp + 0x20]
push eax
call sym.wluart.exe_luaL_addlstring
add esp, 0xc
lea eax, [esp + 0x18]
push eax
call sym.wluart.exe_luaL_pushresult
jmp 0x41badd
push dword [esp + 0x10]
push edi
call sym.wluart.exe_lua_pushstring
pop ecx
pop ecx
push edi
call fcn.0041bb14
push dword [esp + 0x18]
push 0xfffffffffffffffd
push edi
call sym.wluart.exe_lua_setfield
push 0xfffffffffffffffe
push edi
call sym.wluart.exe_lua_settop
mov ecx, dword [esp + 0x240]
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00449662
add esp, 0x21c
ret
Function at 0x421777
Capabilities:
Get common file path

Disassembly:
push esi
push 0x459f70
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
and dword [0x459f7c], 0
push 0xfde9
mov dword [0x459f78], eax
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 0x44bba9
push 5
call esi
mov esi, dword [esp + 0x18]
push 0
push 0x44e8d0
push 0x44e888
push 0x44eb6c
push esi
call sym.wluart.exe_lua_registermodule
push 0x45196c
push 0x451944
push 0x435cf2
push str.Task
push 0x45a5d0
push esi
call sym.wluart.exe_lua_registerobject
push 0x450f90
push 0x450e78
push 0x432635
push str.File
push sym.wluart.exe_TFile
push esi
call sym.wluart.exe_lua_registerobject
add esp, 0x54
push 0x451418
push 0x4513c8
push 0x433ca8
push str.Buffer
push sym.wluart.exe_TBuffer
push esi
call sym.wluart.exe_lua_registerobject
push 0x451248
push 0x451220
push 0x432c9a
push str.Pipe
push sym.wluart.exe_TPipe
push esi
call sym.wluart.exe_lua_registerobject
push 0x451310
push 0x451268
push 0x433112
push str.Directory
push sym.wluart.exe_TDirectory
push esi
call sym.wluart.exe_lua_registerobject
add esp, 0x48
push 0x450d18
push 0x450ce0
push 0x431629
push str.Datetime
push sym.wluart.exe_TDatetime
push esi
call sym.wluart.exe_lua_registerobject
push 0x45168c
push 0x451684
push 0x4345e9
push 0x44eb8c
push sym.wluart.exe_TCOM
push esi
call sym.wluart.exe_lua_registerobject
add esp, 0x30
push 0x45a600
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor eax, eax
inc eax
pop esi
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x459c80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
push esi
mov edi, ebx
call sym.wluart.exe_lua_gettop
pop ecx
test eax, eax
je 0x4218fa
push ebx
push 1
push esi
call sym.wluart.exe_lua_tolwstring
add esp, 0xc
mov edi, eax
lea eax, [ebp - 0x20c]
push eax
push ebx
push edi
push 0x45a600
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x421978
push 0xffffffffffffffff
lea eax, [ebp - 0x20c]
push eax
push esi
call sym.wluart.exe_lua_pushlwstring
add esp, 0xc
cmp dword [ebp + 0xc], ebx
je 0x421965
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push 0x44bba9
push str..tmp
push ebx
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
jmp 0x42196a
mov eax, str.File
push 1
push eax
push esi
call sym.wluart.exe_lua_pushnewinstance
add esp, 0xc
jmp 0x42197f
push esi
call sym.wluart.exe_lua_pushnil
pop ecx
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.00449662
leave
ret
Function at 0x423128
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x21c
mov eax, dword [0x459c80]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x230]
push edi
mov edi, dword [esp + 0x230]
push edi
mov dword [esp + 0x14], esi
call sym.wluart.exe_lua_gettop
push esi
lea ebx, [eax - 1]
mov dword [esp + 0x1c], ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
pop ecx
pop ecx
test ebx, ebx
jne 0x4231a1
push 1
push esi
push edi
call fcn.0042379d
mov ebp, dword [esp + 0x244]
add esp, 0xc
mov ebx, eax
inc ebp
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
pop ecx
test eax, eax
je 0x4232cf
push 0
push 0
push edi
call sym.wluart.exe_luaL_fileresult
jmp 0x4232ca
push str.too_many_arguments
lea eax, [ebx + 0x14]
push eax
push edi
call sym.wluart.exe_luaL_checkstack
mov ebp, dword [esp + 0x244]
xor ebx, ebx
mov eax, dword [esp + 0x20]
add esp, 0xc
inc ebx
dec eax
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x423182
push ebp
push edi
call sym.wluart.exe_lua_type
pop ecx
pop ecx
cmp eax, 3
jne 0x423253
push ebp
push edi
call sym.wluart.exe_luaL_checkinteger
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x423211
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
push dword [esp + 0x14]
mov esi, eax
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ungetc]
push 0x44bba9
push edi
call sym.wluart.exe_lua_pushstring
add esp, 0x14
cmp esi, 0xffffffff
setne bl
jmp 0x42324d
lea eax, [esp + 0x18]
push eax
push edi
call sym.wluart.exe_luaL_buffinit
lea eax, [esp + 0x20]
push ebx
push eax
call sym.wluart.exe_luaL_prepbuffsize
push esi
push ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov esi, eax
lea eax, [esp + 0x38]
add dword [esp + 0x40], esi
push eax
call sym.wluart.exe_luaL_pushresult
xor eax, eax
add esp, 0x24
cmp eax, esi
sbb ebx, ebx
neg ebx
mov esi, dword [esp + 0x10]
jmp 0x4232ac
push 0
push ebp
push edi
call sym.wluart.exe_luaL_checklstring
add esp, 0xc
mov cl, byte [eax]
cmp cl, 0x2a
jne 0x423269
mov cl, byte [eax + 1]
movsx eax, cl
sub eax, 0x4c
je 0x42329e
sub eax, 0x15
je 0x423290
sub eax, 0xb
je 0x42328c
dec eax
sub eax, 1
jne 0x4232be
push esi
push edi
call fcn.004238a6
pop ecx
pop ecx
jmp 0x4232aa
push 1
jmp 0x4232a0
push esi
push edi
call fcn.0042372e
pop ecx
xor ebx, ebx
pop ecx
inc ebx
jmp 0x4232ac
push 0
push esi
push edi
call fcn.0042379d
add esp, 0xc
mov ebx, eax
mov eax, dword [esp + 0x14]
inc ebp
test eax, eax
jne 0x4231c1
jmp 0x423182
push str.invalid_format
push ebp
push edi
call sym.wluart.exe_luaL_argerror
add esp, 0xc
jmp 0x4232ed
test ebx, ebx
jne 0x4232e4
push 0xfffffffffffffffe
push edi
call sym.wluart.exe_lua_settop
push edi
call sym.wluart.exe_lua_pushnil
add esp, 0xc
sub ebp, dword [esp + 0x238]
mov eax, ebp
mov ecx, dword [esp + 0x228]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00449662
add esp, 0x21c
ret
Function at 0x423306
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
xor esi, esi
push ebx
inc esi
call sym.wluart.exe_lua_gettop
mov edi, dword [esp + 0x20]
mov ebp, eax
pop ecx
sub ebp, edi
je 0x4233ce
push edi
push ebx
dec ebp
call sym.wluart.exe_lua_type
pop ecx
pop ecx
cmp eax, 3
jne 0x42339c
push edi
push ebx
call sym.wluart.exe_lua_isinteger
pop ecx
pop ecx
push 0
push edi
push ebx
test eax, eax
je 0x423360
call sym.wluart.exe_lua_tointegerx
push edx
push eax
push str._lld
push dword [esp + 0x30]
call fcn.00416df2
add esp, 0x1c
jmp 0x42337c
call sym.wluart.exe_lua_tonumberx
fstp qword [esp + 4]
mov dword [esp], str._.14g
push dword [esp + 0x24]
call fcn.00416df2
add esp, 0x10
test esi, esi
je 0x423384
test eax, eax
jg 0x4233c9
xor esi, esi
inc edi
test ebp, ebp
jne 0x423326
test esi, esi
jne 0x4233ce
push esi
push esi
push ebx
call sym.wluart.exe_luaL_fileresult
add esp, 0xc
jmp 0x4233d1
lea eax, [esp + 0x1c]
push eax
push edi
push ebx
call sym.wluart.exe_luaL_checklstring
add esp, 0xc
test esi, esi
je 0x423384
push dword [esp + 0x18]
push dword [esp + 0x20]
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 + 0x1c]
jne 0x423384
xor esi, esi
inc esi
jmp 0x423386
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x42372e
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x459c80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x214]
push esi
mov esi, dword [ebp + 0xc]
push edi
push ecx
push eax
call sym.wluart.exe_luaL_buffinit
pop ecx
pop ecx
mov edi, 0x200
lea eax, [ebp - 0x214]
push edi
push eax
call sym.wluart.exe_luaL_prepbuffsize
push esi
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add dword [ebp - 0x20c], eax
add esp, 0x18
cmp eax, edi
je 0x42375d
pop edi
lea eax, [ebp - 0x214]
pop esi
push eax
call sym.wluart.exe_luaL_pushresult
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00449662
leave
ret