joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d0b60
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov edi, ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x4d0cb0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [esi + 0x30]
call fcn.004c67f0
cmp ebx, eax
jl 0x4d0bc2
mov dword [ebp - 8], ebx
mov byte [ebp - 4], 0
lea eax, [ebp - 8]
push eax
push 0
lea edx, [ebp - 0xc]
mov eax, dword [0x5945e8]
call fcn.0040a344
mov ecx, dword [ebp - 0xc]
mov dl, 1
mov eax, dword [0x426214]
call fcn.004179d8
call fcn.004059dc
mov edx, ebx
mov eax, dword [esi + 0x30]
call fcn.004c67dc
mov ebx, eax
movzx eax, byte [ebx + 0x6a]
sub al, 2
jne 0x4d0be7
mov dl, 1
mov eax, dword [0x4c11c8]
call fcn.004c2604
call fcn.004059dc
cmp byte [ebx + 0x6a], 1
jne 0x4d0c49
lea edx, [ebp - 0x10]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4d0c09
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x64
jl 0x4d0c12
mov al, 1
jmp 0x4d0c34
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.004cdf90
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4d0c2e
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x64
setge al
test al, al
je 0x4d0c49
mov dl, 1
mov eax, dword [0x4c11c8]
call fcn.004c2604
call fcn.004059dc
mov eax, dword [ebx + 0xac]
shl eax, 9
cdq
add eax, dword [ebx + 0xa0]
adc edx, dword [ebx + 0xa4]
push edx
push eax
mov eax, dword [esi + 4]
call fcn.00434b18
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x24]
cmp edx, 0
jne 0x4d0c78
cmp eax, 0
je 0x4d0c8d
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x24]
push edx
push eax
mov edx, dword [esi + 4]
mov eax, edi
call fcn.00434dbc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d0cb7
lea eax, [ebp - 0x18]
call fcn.00406e78
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00406e80
ret
Function at 0x4dbc98
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov ebx, eax
cmp dword [ebp - 0xc], 0
jne 0x4dbcc3
mov ecx, 0x18e
mov edx, 0x4dbe90
mov eax, 0x4dbf18
call fcn.004060f0
mov edx, dword [ebp - 0xc]
mov eax, ebx
call fcn.004dc15c
mov dword [ebp - 0x14], 0xa
lea edi, [ebp - 0x20]
mov eax, pe_nt_image_headers32
call fcn.00404654
mov byte [ebp - 0xd], al
mov esi, dword [ebx + 0x10]
and esi, 0xffff
or esi, 2
mov eax, esi
xor eax, 1
imul esi
shr eax, 8
mov esi, eax
mov edx, dword [ebx + 8]
movzx eax, byte [ebp - 0xd]
call fcn.004c3f98
mov dword [ebx + 8], eax
mov eax, dword [ebx + 8]
and eax, 0xff
add dword [ebx + 0xc], eax
imul eax, dword [ebx + 0xc], 0x8088405
inc eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0xc]
shr eax, 0x18
mov edx, dword [ebx + 0x10]
call fcn.004c3f98
mov dword [ebx + 0x10], eax
mov eax, esi
xor al, byte [ebp - 0xd]
mov byte [edi], al
inc edi
dec dword [ebp - 0x14]
jne 0x4dbcd7
mov edx, dword [ebp - 0xc]
mov eax, ebx
call fcn.004dc15c
mov dword [ebp - 0x14], 0xa
lea edi, [ebp - 0x20]
mov esi, dword [ebx + 0x10]
and esi, 0xffff
or esi, 2
mov eax, esi
xor eax, 1
imul esi
shr eax, 8
mov esi, eax
movzx eax, byte [edi]
mov edx, dword [ebx + 8]
call fcn.004c3f98
mov dword [ebx + 8], eax
mov eax, dword [ebx + 8]
and eax, 0xff
add dword [ebx + 0xc], eax
imul eax, dword [ebx + 0xc], 0x8088405
inc eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0xc]
shr eax, 0x18
mov edx, dword [ebx + 0x10]
call fcn.004c3f98
mov dword [ebx + 0x10], eax
mov eax, esi
xor byte [edi], al
inc edi
dec dword [ebp - 0x14]
jne 0x4dbd53
movzx eax, byte [ebp + 0xa]
mov byte [ebp - 0xd], al
mov esi, dword [ebx + 0x10]
and esi, 0xffff
or esi, 2
mov eax, esi
xor eax, 1
imul esi
shr eax, 8
mov esi, eax
mov edx, dword [ebx + 8]
movzx eax, byte [ebp - 0xd]
call fcn.004c3f98
mov edi, eax
mov dword [ebx + 8], edi
and edi, 0xff
add dword [ebx + 0xc], edi
imul edi, dword [ebx + 0xc], 0x8088405
inc edi
mov dword [ebx + 0xc], edi
mov eax, edi
shr eax, 0x18
mov edx, dword [ebx + 0x10]
call fcn.004c3f98
mov dword [ebx + 0x10], eax
mov eax, esi
xor al, byte [ebp - 0xd]
mov byte [ebp - 0x16], al
movzx eax, byte [ebp + 0xb]
mov byte [ebp - 0xd], al
mov esi, dword [ebx + 0x10]
and esi, 0xffff
or esi, 2
mov eax, esi
xor eax, 1
imul esi
shr eax, 8
mov esi, eax
mov edx, dword [ebx + 8]
movzx eax, byte [ebp - 0xd]
call fcn.004c3f98
mov edi, eax
mov dword [ebx + 8], edi
and edi, 0xff
add dword [ebx + 0xc], edi
imul edi, dword [ebx + 0xc], 0x8088405
inc edi
mov dword [ebx + 0xc], edi
mov eax, edi
shr eax, 0x18
mov edx, dword [ebx + 0x10]
call fcn.004c3f98
mov dword [ebx + 0x10], eax
mov eax, esi
xor al, byte [ebp - 0xd]
mov byte [ebp - 0x15], al
mov byte [ebx + 4], 1
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
mov edx, dword [ebp - 0x1c]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x18]
mov dword [eax + 8], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4dc15c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00406774
xor eax, eax
push ebp
push 0x4dc21a
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebx + 8], 0x12345678
mov dword [ebx + 0xc], 0x23456789
mov dword [ebx + 0x10], 0x34567890
mov eax, dword [ebp - 4]
test eax, eax
je 0x4dc1b2
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x4dc1b2
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call fcn.004063e0
test eax, eax
je 0x4dc1bb
sub eax, 4
mov eax, dword [eax]
mov esi, eax
test esi, esi
jle 0x4dc204
mov edi, 1
mov eax, dword [ebp - 4]
movzx eax, byte [eax + edi - 1]
mov edx, dword [ebx + 8]
call fcn.004c3f98
mov dword [ebx + 8], eax
mov eax, dword [ebx + 8]
and eax, 0xff
add dword [ebx + 0xc], eax
imul eax, dword [ebx + 0xc], 0x8088405
inc eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0xc]
shr eax, 0x18
mov edx, dword [ebx + 0x10]
call fcn.004c3f98
mov dword [ebx + 0x10], eax
inc edi
dec esi
jne 0x4dc1c6
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4dc221
lea eax, [ebp - 4]
call fcn.004061c4
ret
Function at 0x4dd100
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov dword [esp + 4], ecx
mov dword [esp], edx
mov ebx, eax
mov eax, dword [ebx + 0x2c]
sub eax, dword [ebx + 0x28]
cmp eax, dword [esp]
jge 0x4dd12f
mov ecx, 0xf0
mov edx, 0x4dd254
mov eax, 0x4dd2dc
call fcn.004060f0
mov eax, dword [esp + 4]
cmp eax, dword [esp]
je 0x4dd156
mov eax, dword [esp]
dec eax
cmp eax, dword [esp + 4]
je 0x4dd156
mov ecx, 0xf2
mov edx, 0x4dd254
mov eax, 0x4dd368
call fcn.004060f0
mov eax, dword [ebx + 0x28]
mov edx, dword [esp]
cmp edx, dword [esp + 4]
jle 0x4dd163
inc eax
mov edx, dword [ebx + 0x18]
mov dword [esp + 8], edx
mov ecx, dword [ebx + 0x1c]
mov edx, dword [ebx + 0x20]
mov esi, dword [esp + 4]
dec esi
test esi, esi
jl 0x4dd1a3
inc esi
shl edx, 5
movzx edi, byte [eax + 2]
xor edx, edi
and edx, 0x3fff
mov edi, eax
and edi, dword [ebx + 0x5c]
mov ebp, dword [esp + 8]
lea ebp, [ebp + edi*4]
mov edi, dword [ecx + edx*4]
mov dword [ebp], edi
mov dword [ecx + edx*4], eax
inc eax
dec esi
jne 0x4dd17a
mov esi, dword [esp + 8]
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], ecx
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x28], eax
cmp byte [ebx + 4], 0
je 0x4dd1dc
mov eax, dword [esp]
add dword [ebx + 0x44], eax
mov eax, dword [esp]
add dword [ebx + 0x48], eax
cmp byte [ebx + 0x34], 0
je 0x4dd1f6
mov eax, dword [ebx + 0x44]
cmp eax, dword [ebx + 0x40]
jb 0x4dd1f6
mov eax, ebx
call fcn.004dd72c
jmp 0x4dd1f6
mov edx, eax
sub edx, dword [ebx + 0x44]
cmp edx, dword [ebx + 0x60]
jl 0x4dd1f6
mov byte [ebx + 4], 1
sub eax, dword [ebx + 0x60]
sub eax, dword [ebx + 0x44]
add dword [ebx + 0x44], eax
add dword [ebx + 0x48], eax
cmp word [ebx + 0x3a], 0
je 0x4dd22e
mov eax, dword [esp]
add dword [ebx + 0x10], eax
mov esi, dword [ebx + 0x10]
test esi, 0xfff
jne 0x4dd22e
mov dword [esp + 0xc], esi
fild dword [esp + 0xc]
fmul dword [0x4dd3dc]
fild qword [ebx + 0x50]
fdivp st(1)
call fcn.004046e0
mov edx, eax
mov eax, dword [ebx + 0x3c]
call dword [ebx + 0x38]
mov eax, dword [ebx + 0x44]
cmp eax, dword [ebx + 0x40]
jb 0x4dd23d
mov eax, ebx
call fcn.004dd72c
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x405080
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x445fad
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x467040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [eax + eax]
test eax, eax
jne 0x4051b2
push eax
push eax
push eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x4051a9
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x1c], eax
jbe 0x4051a9
lea ecx, [eax + 2]
nop dword [eax]
mov eax, 0x100
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
xor edi, edi
xor ebx, ebx
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.00444af6
push ebx
mov esi, eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov dword [ebp - 0x20], esi
test edi, edi
je 0x405148
push edi
call fcn.00444aae
add esp, 4
mov ebx, dword ds:[ebp - 0x18]
lea eax, [ebp - 0x14]
push 0
push 0
push 0
push 0
push eax
push esi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, esi
cmp eax, 0xea
jne 0x405179
mov eax, dword [ebp - 0x14]
mov ecx, 2
jmp 0x405118
test eax, eax
jne 0x405187
mov ecx, dword [ebp - 0x10]
mov edx, esi
call fcn.004051e0
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.00444aae
inc ebx
add esp, 4
mov ecx, 2
mov dword [ebp - 0x18], ebx
cmp ebx, dword [ebp - 0x1c]
jb 0x405100
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ad80
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4465fd
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x467040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
test cl, cl
jne 0x40addf
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 8
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str._System_Scanner__Running_checks_to_detect_event_log_bypasses..._n
call fcn.00406160
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 7
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea eax, [ebp - 0x2c]
push eax
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServicesEventLogSystem
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop word [eax + eax]
test eax, eax
jne 0x40af26
lea eax, ds:[ebp - 0x30]
push eax
push 0
push 0
push 0
push str.File
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40af19
mov eax, dword [ebp - 0x30]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00444af6
add esp, 4
mov esi, eax
lea eax, [ebp - 0x30]
push eax
push esi
push 0
push 0
push str.File
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40af10
mov ecx, esi
mov dword [ebp - 0x18], eax
xorps xmm0, xmm0
mov dword [ebp - 0x14], eax
movups xmmword [ebp - 0x28], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ae80
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.004063e0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 7
push str._SystemRoot_System32WinevtLogsSystem.evtx
cmova eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x40aece
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.____Event_log_bypass_detected._Ban_the_user._n
call fcn.0040af60
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x40af10
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40af06
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40af06
nop word [eax + eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00444ae8
add esp, 8
push esi
call fcn.00444aae
add esp, 4
push dword ds:[ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00444aa0
mov esp, ebp
pop ebp
ret
Function at 0x40cb40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40cb6f
push dword ds:[ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x40cb97
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40cb9d
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x40cc0b
jg 0x40cbb4
test esi, esi
je 0x40cc0b
test ecx, ecx
jl 0x40cc06
jg 0x40cbbe
test eax, eax
je 0x40cc06
nop
cmp edi, ecx
jg 0x40cbd4
jl 0x40cbca
cmp esi, eax
jae 0x40cbd4
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x40cc0e
mov ecx, dword [ebp + 8]
jmp 0x40cc18
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x40cc32
jg 0x40cc18
test esi, esi
je 0x40cc32
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x40cc32
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40cc60
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 8
push ebx
mov ebx, ecx
push esi
mov esi, dword [esp + 0x18]
test eax, eax
jg 0x40cc85
jl 0x40cc79
test esi, esi
jne 0x40cc85
pop esi
xor eax, eax
xor edx, edx
pop ebx
add esp, 8
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40cc9f
push eax
push esi
push dword [esp + 0x1c]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
add esp, 8
ret 0xc
mov eax, dword [ebx + 0x1c]
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edx, dword [eax]
mov edi, esi
test edx, edx
je 0x40ccea
mov eax, dword ds:[ebx + 0x2c]
lea ecx, [ebx + 0x2c]
mov dword [esp + 0x10], ecx
mov eax, dword [eax]
test eax, eax
je 0x40ccf1
cmp eax, dword [esp + 0x20]
cmovb esi, eax
push esi
push edx
push ebp
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add ebp, esi
sub edi, esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0x20]
jmp 0x40ccf1
lea eax, [ebx + 0x2c]
mov dword [esp + 0x10], eax
cmp dword [ebx + 0x4c], 0
je 0x40cd6e
mov ecx, dword ds:[ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40cd1e
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [eax], edx
nop
cmp edi, 0xfff
jbe 0x40cd58
nop dword [eax + eax]
push dword ds:[ebx + 0x4c]
push 0xfff
push 1
push ebp
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
add ebp, eax
sub edi, eax
cmp eax, 0xfff
jne 0x40cd6e
cmp edi, eax
ja 0x40cd30
test edi, edi
je 0x40cd6e
push dword [ebx + 0x4c]
push edi
push 1
push ebp
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
sub edi, eax
mov edx, dword [esp + 0x24]
sub esi, edi
pop edi
pop ebp
mov eax, esi
sbb edx, 0
pop esi
pop ebx
add esp, 8
ret 0xc
Function at 0x40d160
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x30
mov eax, dword [0x467040]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
mov ebx, dword [esp + 0x38]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40d190
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00444aa0
add esp, 0x30
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40d1cd
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40d1cd
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00444aa0
add esp, 0x30
ret 4
cmp dword [esi + 0x4c], 0
je 0x40d2b8
mov edi, dword ds:[esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40d1f8
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x40d204
movsx eax, bl
jmp 0x40d244
lea eax, [esp + 0x10]
mov byte [esp + 0xf], bl
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x23]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x40d26f
sub eax, 1
je 0x40d26f
sub eax, 2
jne 0x40d2b8
movsx eax, byte [esp + 0xf]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00444aa0
add esp, 0x30
ret 4
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x18]
sub edi, eax
je 0x40d292
lfence
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40d2b8
lea ecx, [esp + 0xf]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [esp + 0x14], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00444aa0
add esp, 0x30
ret 4
mov ecx, dword [esp + 0x38]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00444aa0
add esp, 0x30
ret 4
Function at 0x40d6a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x28
mov eax, dword [0x467040]
xor eax, esp
mov dword [esp + 0x24], eax
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x40d77d
cmp byte ds:[edi + 0x3d], 0
je 0x40d77d
mov eax, dword [edi]
push esi
push 0xffffffffffffffff
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x44b694]
mov ecx, edi
call esi
nop word [eax + eax]
cmp eax, 0xffffffff
je 0x40d76a
mov ecx, dword ds:[edi + 0x38]
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [edi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x40d72b
sub eax, 1
je 0x40d72f
sub eax, 2
jne 0x40d76a
mov byte [edi + 0x3d], al
mov al, 1
pop esi
pop edi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00444aa0
add esp, 0x28
ret
mov byte [edi + 0x3d], 0
mov esi, dword [esp + 8]
lea eax, [esp + 0xc]
sub esi, eax
je 0x40d752
lfence
push dword [edi + 0x4c]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x40d76a
cmp byte [edi + 0x3d], 0
pop esi
sete al
pop edi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00444aa0
add esp, 0x28
ret
pop esi
xor al, al
pop edi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00444aa0
add esp, 0x28
ret
mov ecx, dword [esp + 0x28]
mov al, 1
pop edi
xor ecx, esp
call fcn.00444aa0
add esp, 0x28
ret
Function at 0x40ef20
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push esi
mov esi, ecx
mov eax, esi
cmp dword [esi + 0x14], 7
jbe 0x40ef34
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [eax + eax]
cmp eax, 0xffffffff
je 0x40ef8a
test al, 1
je 0x40ef8a
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.____Prefetch_file_is_marked_as_read_only:
call fcn.00406160
cmp dword [esi + 0x14], 7
mov ecx, dword [esi + 0x10]
jbe 0x40ef64
mov esi, dword [esi]
push ecx
mov edx, esi
mov ecx, eax
call fcn.00408f60
add esp, 4
mov edx, str.._This_is_bannable.
mov ecx, eax
call fcn.00406160
push 0x408660
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
pop esi
mov esp, ebp
pop ebp
ret