joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40fea0
Capabilities:
Check http status code

Disassembly:
sub esp, 0xd8
mov eax, dword [0x45a220]
xor eax, esp
mov dword [esp + 0xd4], eax
push ebx
push ebp
mov ebp, dword [esp + 0xe8]
lea eax, [esp + 8]
push esi
push edi
mov edi, dword [esp + 0xec]
push eax
push edi
call fcn.0040f3a0
mov esi, eax
add esp, 8
test esi, esi
je 0x40fef4
mov ecx, dword [esp + 0x10]
sub esi, edi
mov edx, dword [esp + 0x14]
mov al, 3
mov dword [ebp], ecx
mov dword [ebp + 4], edx
mov byte [ebp + 8], al
lea eax, [esi + 1]
jmp 0x40ff14
push 0x44f298
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strpbrk]
add esp, 8
test eax, eax
je 0x40ff2d
movzx ebx, byte [eax]
or ebx, 0x20
cmp ebx, 0x6e
jne 0x40ff2f
xor eax, eax
mov ecx, dword [esp + 0xe4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044c1b1
add esp, 0xd8
ret
xor ebx, ebx
push ebx
lea eax, [esp + 0x14]
push eax
push edi
call fcn.0040f320
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40ffcc
push 0x2e
push edi
call sub.VCRUNTIME140.dll_strchr
mov esi, eax
add esp, 8
test esi, esi
je 0x40ff12
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ff60
sub ecx, edx
cmp ecx, 0xc8
ja 0x40ff12
lea edx, [esp + 0x18]
mov ecx, edi
sub edx, edi
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x40ff80
call dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_localeconv]
sub esi, edi
push ebx
mov eax, dword [eax]
mov al, byte [eax]
mov byte [esp + esi + 0x1c], al
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0040f320
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40ff12
mov eax, edi
lea ecx, [esp + 0x18]
sub eax, ecx
add esi, eax
test esi, esi
je 0x40ff12
movsd xmm0, qword [esp + 0x10]
sub esi, edi
mov al, 0x13
movsd qword [ebp], xmm0
mov byte [ebp + 8], al
lea eax, [esi + 1]
jmp 0x40ff14
Function at 0x410090
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
push esi
push edi
call dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_localeconv]
mov ecx, dword [esp + 0x1c]
xor edi, edi
xor esi, esi
xorps xmm1, xmm1
mov eax, dword [eax]
movsx eax, byte [eax]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
mov dword [eax], ecx
mov al, byte [ecx]
mov byte [esp + 0x1f], al
movzx eax, al
test byte [eax + 0x44ea69], 8
je 0x4100e5
mov al, byte [ecx + 1]
inc ecx
mov byte [esp + 0x1f], al
movzx eax, al
test byte [eax + 0x44ea69], 8
jne 0x4100d1
mov al, byte [esp + 0x1f]
lea edx, [ecx + 1]
cmp al, 0x2d
jne 0x4100fa
mov dword [esp + 0xc], 1
jmp 0x410103
cmp al, 0x2b
mov dword [esp + 0xc], esi
cmovne edx, ecx
cmp byte [edx], 0x30
jne 0x410249
mov al, byte [edx + 1]
cmp al, 0x78
je 0x41011b
cmp al, 0x58
jne 0x410249
movsd xmm2, qword [0x44f300]
add edx, 2
mov al, byte [edx]
movsx ecx, al
mov byte [esp + 0x1f], al
cmp ecx, dword [esp + 8]
jne 0x410147
cmp dword [esp + 0x14], 0
jne 0x41019c
mov dword [esp + 0x14], 1
inc edx
jmp 0x410126
movzx eax, al
test byte [eax + 0x44ea69], 0x10
je 0x41019c
test edi, edi
jne 0x410164
cmp byte [esp + 0x1f], 0x30
jne 0x410164
inc dword [esp + 0x10]
jmp 0x410191
inc edi
cmp edi, 0x1e
jg 0x410190
test byte [ecx + 0x44ea69], 2
je 0x410178
add ecx, 0xffffffd0
jmp 0x41017e
or ecx, 0x20
sub ecx, 0x57
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm2
addsd xmm1, xmm0
jmp 0x410191
inc esi
cmp dword [esp + 0x14], 0
je 0x410199
dec esi
inc edx
jmp 0x410126
mov eax, dword [esp + 0x10]
add eax, edi
je 0x410249
mov eax, dword [esp + 0x20]
shl esi, 2
mov dword [eax], edx
mov al, byte [edx]
cmp al, 0x70
je 0x4101bb
cmp al, 0x50
jne 0x410223
mov al, byte [edx + 1]
xor ecx, ecx
mov byte [esp + 0x1f], al
cmp al, 0x2d
jne 0x4101d0
lea edi, [ecx + 1]
lea eax, [ecx + 2]
jmp 0x4101dd
xor eax, eax
xor edi, edi
cmp byte [esp + 0x1f], 0x2b
sete al
inc eax
add edx, eax
mov al, byte [edx]
mov byte [esp + 0x1f], al
movzx eax, al
test byte [eax + 0x44ea69], 2
je 0x410249
movsx eax, byte [esp + 0x1f]
lea ecx, [ecx + ecx*4]
inc edx
lea ecx, [ecx - 0x18]
lea ecx, [eax + ecx*2]
mov al, byte [edx]
mov byte [esp + 0x1f], al
movzx eax, al
test byte [eax + 0x44ea69], 2
jne 0x4101f1
mov eax, ecx
neg eax
test edi, edi
cmove eax, ecx
add esi, eax
mov eax, dword [esp + 0x20]
mov dword [eax], edx
cmp dword [esp + 0xc], 0
je 0x410231
xorps xmm1, xmmword [0x44f310]
push esi
sub esp, 8
movsd qword [esp], xmm1
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_ldexp]
add esp, 0xc
pop edi
pop esi
add esp, 0x10
ret
fldz
pop edi
pop esi
add esp, 0x10
ret
Function at 0x429fc0
Capabilities:
Get common file path

Disassembly:
push esi
push 0x45a4d0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
push 0xfde9
mov dword [0x45a4d8], eax
mov dword [0x45a4dc], 0
call dword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov esi, dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
push str..UTF8
push 0
call esi
push 0x44e919
push 5
call esi
mov esi, dword [esp + 0x18]
push 0
push 0x4516e8
push 0x4516a0
push 0x451984
push esi
call sym.luart_static.exe_lua_registermodule
push 0x454768
push 0x454740
push 0x442380
push str.Task
push 0x45aa78
push esi
call sym.luart_static.exe_lua_registerobject
push 0x453d60
push 0x453c48
push 0x43e030
push str.File
push sym.luart_static.exe_TFile
push esi
call sym.luart_static.exe_lua_registerobject
add esp, 0x54
push 0x4541e8
push 0x454198
push 0x43fc90
push str.Buffer
push sym.luart_static.exe_TBuffer
push esi
call sym.luart_static.exe_lua_registerobject
push 0x454018
push 0x453ff0
push 0x43e8f0
push str.Pipe
push sym.luart_static.exe_TPipe
push esi
call sym.luart_static.exe_lua_registerobject
push 0x4540e0
push 0x454038
push 0x43eda0
push str.Directory
push sym.luart_static.exe_TDirectory
push esi
call sym.luart_static.exe_lua_registerobject
add esp, 0x48
push 0x453ae8
push 0x453ab0
push 0x43cbf0
push str.Datetime
push sym.luart_static.exe_TDatetime
push esi
call sym.luart_static.exe_lua_registerobject
push 0x45445c
push 0x454454
push 0x4405f0
push 0x4519a4
push sym.luart_static.exe_TCOM
push esi
call sym.luart_static.exe_lua_registerobject
add esp, 0x30
push 0x45aaa0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, 1
pop esi
ret

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

Disassembly:
sub esp, 0x20c
mov eax, dword [0x45a220]
xor eax, esp
mov dword [esp + 0x208], eax
push esi
mov esi, dword [esp + 0x214]
push edi
push esi
xor edi, edi
call sym.luart_static.exe_lua_gettop
add esp, 4
test eax, eax
je 0x42a15a
push edi
push 1
push esi
call sym.luart_static.exe_lua_tolwstring
add esp, 0xc
mov edi, eax
lea eax, [esp + 8]
push eax
push 0
push edi
push 0x45aaa0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x42a1e6
push 0xffffffffffffffff
lea eax, [esp + 0xc]
push eax
push esi
call sym.luart_static.exe_lua_pushlwstring
add esp, 0xc
cmp dword [esp + 0x21c], 0
je 0x42a1d3
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x44e919
push str..tmp
push 0
push 0xffffffffffffffff
push esi
call sym.luart_static.exe_lua_tolstring
add esp, 0xc
push eax
push esi
call sym.luart_static.exe_luaL_gsub
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, str.Directory
push 1
push eax
push esi
call sym.luart_static.exe_lua_pushnewinstance
add esp, 0xc
jmp 0x42a1ef
mov eax, str.File
push 1
push eax
push esi
call sym.luart_static.exe_lua_pushnewinstance
add esp, 0xc
jmp 0x42a1ef
push esi
call sym.luart_static.exe_lua_pushnil
add esp, 4
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [esp + 0x214]
add esp, 4
mov eax, 1
pop edi
pop esi
xor ecx, esp
call fcn.0044c1b1
add esp, 0x20c
ret
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.luart_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.luart_static.exe_lua_type
add esp, 8
cmp eax, 3
jne 0x42c54b
push edi
push ebx
call sym.luart_static.exe_lua_isinteger
add esp, 8
push 0
push edi
push ebx
test eax, eax
je 0x42c507
call sym.luart_static.exe_lua_tointegerx
push edx
push eax
push str._lld
push dword [ebp + 0xc]
call fcn.0041cc30
add esp, 0x1c
jmp 0x42c522
call sym.luart_static.exe_lua_tonumberx
add esp, 4
fstp qword [esp]
push str._.14g
push dword [ebp + 0xc]
call fcn.0041cc30
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.luart_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.luart_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.luart_static.exe_zip_entry_openbyindex
inc edi
add esp, 8
mov dword [esp + 0x20], edi
test eax, eax
jne 0x42f365
push esi
call sym.luart_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.luart_static.exe_zip_entry_isdir
add esp, 4
test eax, eax
jne 0x42f323
push edi
push esi
call sym.luart_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.luart_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.luart_static.exe_lua_isstring
add esp, 8
test eax, eax
je 0x42f3c6
push 0
push esi
push edi
call sym.luart_static.exe_lua_tolwstring
add esp, 0xc
jmp 0x42f3e0
push dword [sym.luart_static.exe_TDirectory]
push esi
push edi
call sym.luart_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 + 0x452850]
mov ecx, eax
shr eax, 4
and ecx, 0xf
xor edx, ecx
xor eax, dword [edx*4 + 0x452850]
sub edi, 1
jne 0x42fcd0
pop edi
not eax
pop esi
ret
Function at 0x430bd0
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 0x430c41
jg 0x430c08
test ecx, ecx
jb 0x430c41
cmp ebx, ecx
jne 0x430c10
cmp edx, edi
je 0x430c24
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 0x430c41
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 0x439970
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2040
call fcn.0044c660
mov eax, dword [0x45a220]
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.0044c1b1
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.0044c1b1
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 0x45258c
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.0044c1b1
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.0044c1b1
add esp, 0x2040
ret
Function at 0x439be0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x45c
mov eax, dword [0x45a220]
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.0044c1b1
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.0044c1b1
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.0044c1b1
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.0044c1b1
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.0044c1b1
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.0044c1b1
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.0044c1b1
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 0x45a178
push str.read
push 2
push edi
call sym.luart_static.exe_luaL_checkoption
push edi
mov ebx, eax
call sym.luart_static.exe_lua_gettop
push dword [sym.luart_static.exe_TFile]
mov ebp, eax
push 1
push edi
call sym.luart_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 + 0x45a18c]
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.luart_static.exe_luaL_error
add esp, 0x10
mov dword [esi + 0x54], ebx
cmp ebx, 2
jge 0x43d308
push dword [esi + 4]
call sym.luart_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 0x45a19c
push str.binary
push ebp
push edi
call sym.luart_static.exe_luaL_checkoption
mov dword [esi + 0x18], eax
jmp 0x43d34a
push 0x45a19c
push str.utf8
push 3
push edi
call sym.luart_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 0x453dbc
jmp 0x43d344
push dword [esi + 4]
push 1
push 3
push 0x453f38
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.luart_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