joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100cc650
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
xor esi, esi
mov eax, edx
push edi
mov dword [esp + 0xc], eax
cmp dword [ebp + 0xc], esi
je 0x100cc679
call fcn.100cad10
mov esi, eax
test esi, esi
je 0x100cc6a7
lea ebx, [esi + 0x2c]
jmp 0x100cc67d
lea ebx, [esp + 0x14]
push ebx
push 0x10375558
push dword [ebp + 8]
call sym.python310.dll_PyArg_Parse
add esp, 0xc
test eax, eax
jne 0x100cc6b0
test esi, esi
je 0x100cc6a7
add dword [esi], 0xffffffff
jne 0x100cc6a7
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [0x103fb118]
xor eax, eax
mov ecx, 0x103fb118
xchg dword [ecx], eax
test edi, edi
je 0x100cc7b4
mov edx, dword [edi + 8]
mov ecx, 0x103fb0c0
add edx, 0x2c
push edi
call fcn.101c8c00
add esp, 4
lea eax, [esi + 8]
mov ecx, esi
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [esp + 0x10]
push ecx
push eax
push dword [ebx + 8]
push dword [ebx]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, edi
mov dword [esp + 0xc], eax
call fcn.101c8d20
mov ecx, dword [edi + 8]
mov edx, dword [ecx + 8]
mov ecx, dword [edx + 0x118]
add edx, 0x118
xchg dword [edx], edi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x100cc726
xor edi, edi
jmp 0x100cc732
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esp + 0xc]
test esi, esi
je 0x100cc78b
test eax, eax
jne 0x100cc749
cmp edi, 0x3e5
jne 0x100cc75f
mov dword [esi + 0x20], 1
push edi
push esi
push 0x103754d8
call sym.python310.dll_Py_BuildValue
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add dword [esi], 0xffffffff
jne 0x100cc770
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
push 0
push 0
push 0
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call sym.python310.dll_PyBuffer_Release
add esp, 4
cmp dword [esp + 0xc], 0
je 0x100cc770
push edi
push dword [esp + 0x14]
push 0x10375190
call sym.python310.dll_Py_BuildValue
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x10389b20
call sym.python310.dll__Py_FatalError_TstateNULL
int3
Function at 0x10118740
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 4], 1
test edi, edi
jle 0x1011878a
mov ax, word [ebp - 4]
sub edx, esi
nop dword [eax]
mov ecx, 0x7fff
lea esi, [esi + 2]
xor cx, word [edx + esi - 2]
add ax, cx
mov word [ebp - 4], ax
mov ecx, dword [ebp - 4]
and ecx, 0x7fff
shr ax, 0xf
mov word [esi - 2], cx
sub edi, 1
jne 0x10118760
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10127280
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x103cc538]
push ebx
push esi
push edi
cmp eax, 0xffffffff
jne 0x101272c9
cmp dword [sym.python310.dll_Py_IgnoreEnvironmentFlag], 0
jne 0x101272bd
push str.PYTHONMALLOCSTATS
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x101272bd
cmp byte [eax], 0
je 0x101272bd
mov dword [0x103cc538], 1
jmp 0x101272cd
mov dword [0x103cc538], 0
jmp 0x101272e1
test eax, eax
je 0x101272e1
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call sym.python310.dll__PyObject_DebugMallocStats
add esp, 4
mov esi, dword [0x103d1e84]
test esi, esi
jne 0x101273b6
mov eax, dword [0x103d1e80]
test eax, eax
je 0x1012732a
lea edi, [eax + eax]
cmp edi, eax
jbe 0x10127482
cmp edi, 0x9249249
ja 0x10127482
lea eax, [edi*8]
mov ebx, edi
sub eax, edi
shl eax, 2
cmp eax, 0x7fffffff
ja 0x10127482
jmp 0x10127336
mov ebx, 0x10
mov eax, 0x1c0
mov edi, ebx
push eax
push dword [0x103d1e7c]
push dword [0x103cc53c]
call dword [0x103cc548]
mov ecx, eax
add esp, 0xc
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x10127482
mov edx, dword [0x103d1e80]
mov esi, edx
mov dword [0x103d1e7c], ecx
cmp esi, edi
jae 0x101273a4
lea edx, [esi*8]
sub edx, esi
lea edi, [ebx - 1]
add edx, 5
lea edx, [ecx + edx*4]
nop dword [eax]
cmp esi, edi
mov dword [edx - 0x14], 0
lea ecx, [edx + 8]
sbb eax, eax
lea edx, [edx + 0x1c]
and eax, ecx
inc esi
mov dword [edx - 0x1c], eax
cmp esi, ebx
jb 0x10127380
mov ecx, dword [ebp - 4]
mov edx, dword [0x103d1e80]
lea eax, [edx*8]
mov dword [0x103d1e80], ebx
sub eax, edx
lea esi, [ecx + eax*4]
mov eax, dword [esi + 0x14]
push 0x40000
push dword [0x103cc550]
mov dword [0x103d1e84], eax
call dword [0x103cc554]
mov edx, eax
add esp, 8
test edx, edx
je 0x10127474
mov ecx, edx
shr eax, 0x12
and ecx, 0x3ffff
jne 0x101273f6
mov dword [eax*8 + 0x103d1e90], 0xffffffff
jmp 0x1012740d
mov dword [eax*8 + 0x103d1e90], ecx
lea eax, [edx + 0x40000]
shr eax, 0x12
mov dword [eax*8 + 0x103d1e94], ecx
mov ecx, dword [0x103d1e88]
mov eax, dword [0x103d1e8c]
inc ecx
inc dword [0x103d1d74]
cmp ecx, eax
mov dword [0x103d1e88], ecx
cmova eax, ecx
mov dword [esi], edx
mov ecx, edx
mov dword [0x103d1e8c], eax
mov dword [esi + 0x10], 0
mov eax, 0x40
mov dword [esi + 4], edx
mov dword [esi + 8], 0x40
and ecx, 0xfff
je 0x10127468
sub edx, ecx
mov dword [esi + 8], 0x3f
add edx, 0x1000
mov eax, 0x3f
mov dword [esi + 4], edx
mov dword [esi + 0xc], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x103d1e84]
mov dword [esi + 0x14], eax
mov dword [0x103d1e84], esi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x101b7980
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
push 0
push esi
push ebx
push 0x10387664
push str.winreg.QueryValue
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], 0
call sym.python310.dll_PySys_Audit
add esp, 0x14
test eax, eax
jns 0x101b79c0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
push 0
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
cmp eax, 0xea
jne 0x101b79e3
mov eax, pe_nt_image_headers32
mov dword [esp + 0x10], eax
mov esi, eax
jmp 0x101b7a13
test eax, eax
je 0x101b7a01
push 0
push 0
push eax
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
mov esi, eax
cmp esi, 0x7fffffff
ja 0x101b7acd
push eax
push dword [0x103cc55c]
call dword [0x103cc560]
mov edi, eax
add esp, 8
test edi, edi
je 0x101b7acd
lea eax, [esp + 0x10]
mov dword [esp + 0x10], esi
push eax
push edi
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
mov ebx, eax
cmp ebx, 0xea
jne 0x101b7a92
nop dword [eax + eax]
add esi, esi
cmp esi, 0x7fffffff
ja 0x101b7abd
push esi
push edi
push dword [0x103cc55c]
call dword [0x103cc568]
add esp, 0xc
test eax, eax
je 0x101b7abd
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], esi
push ecx
push eax
push dword [ebp + 8]
mov edi, eax
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
mov ebx, eax
cmp ebx, 0xea
je 0x101b7a50
test ebx, ebx
je 0x101b7ad9
push edi
push dword [0x103cc55c]
call dword [0x103cc56c]
push 0
push 0
push ebx
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push dword [0x103cc55c]
call dword [0x103cc56c]
add esp, 8
call sym.python310.dll_PyErr_NoMemory
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x101b7ae0
sub ecx, edx
sar ecx, 1
push ecx
push edi
call sym.python310.dll_PyUnicode_FromWideChar
push edi
push dword [0x103cc55c]
mov esi, eax
call dword [0x103cc56c]
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x101b7b20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
push edi
push 0
push ebx
push 0x10387664
push str.winreg.QueryValue
mov dword [esp + 0x20], 0
call sym.python310.dll_PySys_Audit
add esp, 0x14
test eax, eax
js 0x101b7cdb
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 0xea
jne 0x101b7b7c
mov eax, pe_nt_image_headers32
mov dword [esp + 0xc], eax
jmp 0x101b7ba9
test eax, eax
je 0x101b7b9a
push 0
push 0
push eax
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xc]
cmp eax, 0x7fffffff
ja 0x101b7c7c
push eax
push dword [0x103cc55c]
call dword [0x103cc560]
mov esi, eax
add esp, 8
test esi, esi
je 0x101b7c7c
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], ecx
push eax
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp edi, 0xea
jne 0x101b7c41
nop word [eax + eax]
mov eax, dword [esp + 0xc]
add eax, eax
mov dword [esp + 0xc], eax
cmp eax, 0x7fffffff
ja 0x101b7c6c
push eax
push esi
push dword [0x103cc55c]
call dword [0x103cc568]
add esp, 0xc
test eax, eax
je 0x101b7c6c
mov ecx, dword [esp + 0xc]
mov esi, eax
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp edi, 0xea
je 0x101b7bf0
test edi, edi
je 0x101b7c88
push esi
push dword [0x103cc55c]
call dword [0x103cc56c]
push 0
push 0
push edi
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push dword [0x103cc55c]
call dword [0x103cc56c]
add esp, 8
call sym.python310.dll_PyErr_NoMemory
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, esi
call fcn.101b73c0
push esi
push dword [0x103cc55c]
mov edi, eax
call dword [0x103cc56c]
add esp, 0xc
test edi, edi
je 0x101b7cdb
push dword [esp + 0x14]
push edi
push 0x103657e0
call sym.python310.dll__Py_BuildValue_SizeT
add esp, 0xc
mov esi, eax
add dword [edi], 0xffffffff
jne 0x101b7cd2
mov ecx, dword [edi + 4]
push edi
mov ecx, dword [ecx + 0x18]
call ecx
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x101b8740
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x103b1004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov esi, ecx
push edx
push 0x101
push esi
call edi
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
add esp, 0xc
push 0x202
lea eax, [ebp - 0x210]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x210]
push esi
push 0x101
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x210]
push 0
push str.libos.py
push eax
push 0x101
push eax
call dword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchCombineEx]
test eax, eax
js 0x101b8888
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x101b8872
lea eax, [ebp - 0x210]
push 0x101
push eax
call ebx
mov edi, eax
add esp, 8
cmp edi, 0x100
jae 0x101b8819
lea eax, [ebp - 0x210]
mov dword [ebp + edi*2 - 0x210], 0x63
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
xor eax, eax
mov word [ebp + edi*2 - 0x210], ax
test ecx, ecx
jne 0x101b8872
test esi, esi
jne 0x101b8821
xor eax, eax
jmp 0x101b884a
push 0x101
push esi
call ebx
add esp, 8
cmp eax, 0x101
jae 0x101b8897
test eax, eax
je 0x101b884a
movzx ecx, word [esi + eax*2]
cmp ecx, 0x5c
je 0x101b884a
cmp ecx, 0x2f
je 0x101b884a
sub eax, 1
jne 0x101b8837
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
xor ecx, ecx
mov word [esi + eax*2], cx
cmp word [esi], cx
jne 0x101b8770
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1024a596
mov esp, ebp
pop ebp
ret
push str.buffer_overflow_in_getpathp.cs_join__
push str.join
call sym.python310.dll__Py_FatalErrorFunc
push str.buffer_overflow_in_getpathp.cs_reduce__
push str.reduce
call sym.python310.dll__Py_FatalErrorFunc
int3
Function at 0x101c86c0
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
jns 0x101c86ea
push str.negative_argument_not_allowed
push dword [sym.python310.dll_PyExc_ValueError]
call sym.python310.dll_PyErr_Format
add esp, 8
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
je 0x101c873d
mov eax, dword [0x103f9f04]
test eax, eax
jne 0x101c872e
push 0xf0000000
push 1
push eax
push eax
push 0x103f9f04
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x101c8729
push 0
push 0
push 0
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
add esp, 0x10
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x103f9f04]
push dword [ebp + 8]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x101c870d
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x101c8750
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
jns 0x101c877a
push str.negative_argument_not_allowed
push dword [sym.python310.dll_PyExc_ValueError]
call sym.python310.dll_PyErr_Format
add esp, 8
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
je 0x101c87cd
mov eax, dword [0x103f9f04]
test eax, eax
jne 0x101c87be
push 0xf0000000
push 1
push eax
push eax
push 0x103f9f04
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x101c87b9
push 0
push 0
push 0
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
add esp, 0x10
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x103f9f04]
push dword [ebp + 8]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x101c879d
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x101c9290
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [0x103fb118]
test edi, edi
jne 0x101c92e0
cmp dword [0x103fb11c], edi
je 0x101c92c9
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x103fb124]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
test edi, edi
jne 0x101c92e0
push dword [ebp + 0xc]
mov eax, dword [0x103fb020]
push dword [ebp + 8]
push eax
call sym.python310.dll__PyEval_AddPendingCall
add esp, 0xc
pop edi
pop ebp
ret
push dword [ebp + 0xc]
mov eax, dword [edi + 8]
push dword [ebp + 8]
push eax
call sym.python310.dll__PyEval_AddPendingCall
add esp, 0xc
pop edi
pop ebp
ret
Function at 0x101e9b30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
push edi
mov ecx, 0x7fffffff
xor edi, edi
cmp dword [ebp + 0x10], ecx
push 0x101b5380
cmovbe ecx, dword [ebp + 0x10]
mov dword [esp + 0x14], ecx
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__set_thread_local_invalid_parameter_handler]
add esp, 4
mov dword [esp + 0x14], eax
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, 0x103fb118
mov esi, dword [0x103fb118]
xor eax, eax
xchg dword [ecx], eax
test esi, esi
je 0x101e9c6e
mov edx, dword [esi + 8]
mov ecx, 0x103fb0c0
add edx, 0x2c
push esi
call fcn.101c8c00
add esp, 4
call ebx
push dword [esp + 0x10]
push dword [ebp + 0xc]
mov dword [eax], 0
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
add esp, 0xc
mov dword [esp + 0xc], eax
call ebx
mov ecx, esi
mov ebx, dword [eax]
call fcn.101c8d20
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov eax, dword [ecx + 0x118]
add ecx, 0x118
xchg dword [ecx], esi
mov esi, dword [esp + 0xc]
test esi, esi
jns 0x101e9c26
cmp ebx, 4
jne 0x101e9c26
mov esi, dword [0x103fb118]
mov ecx, 1
mov eax, dword [0x103fa66c]
test eax, eax
cmove eax, ecx
mov edi, dword [esi + 8]
mov dword [0x103fa66c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x103fb038]
jne 0x101e9c5e
cmp edi, dword [0x103fb020]
jne 0x101e9c5e
push esi
call sym.python310.dll__PyErr_CheckSignalsTstate
mov edi, eax
add esp, 4
test edi, edi
je 0x101e9b60
mov esi, dword [esp + 0xc]
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__set_thread_local_invalid_parameter_handler]
add esp, 4
test edi, edi
jne 0x101e9c4b
test esi, esi
jns 0x101e9c65
push edi
push edi
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetFromErrnoWithFilenameObjects
add esp, 0xc
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call eax
mov dword [eax], ebx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
jmp 0x101e9b60
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x10389b20
call sym.python310.dll__Py_FatalError_TstateNULL
int3
Function at 0x101ff8e0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
push dword [esi]
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x10]
sub eax, edx
push eax
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov eax, dword [esi + 0x18]
add esp, 0x10
mov dword [esi + 0x10], eax
pop esi
ret

Function at 0x101ff910
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov dword [ebp - 4], edx
push edi
mov edi, dword [esi + 0x10]
test edi, edi
jne 0x101ff92a
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
test ecx, ecx
je 0x101ff95c
mov eax, dword [esi + 0x18]
sub edi, eax
push ecx
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov eax, dword [esi + 0x18]
add esp, 0x10
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x10], eax
sub ecx, eax
xor eax, eax
cmp dword [ebp - 4], ecx
pop edi
setle al
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc]
sub edi, dword [esi + 0x18]
push ebx
mov ebx, dword [eax + 8]
mov ecx, ebx
sar ecx, 3
cmp ebx, 0x1000000
lea eax, [ebx + 0x400]
cmovle ecx, eax
mov eax, 0x7fffffff
cmp ecx, edx
cmovg edx, ecx
sub eax, ebx
cmp edx, eax
jle 0x101ff99a
pop ebx
pop edi
mov dword [esi + 4], 3
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
add ebx, edx
lea eax, [esi + 0xc]
push ebx
push eax
call sym.python310.dll__PyBytes_Resize
add esp, 8
test eax, eax
je 0x101ff9cb
pop ebx
pop edi
mov dword [esi + 0x18], 0
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xc]
add ecx, 0x10
mov dword [esi + 0x18], ecx
lea eax, [ecx + edi]
mov dword [esi + 0x10], eax
lea eax, [ecx + ebx]
pop ebx
mov dword [esi + 0x14], eax
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x101ff9f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
test edi, edi
je 0x101ffa66
push esi
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x101ffa65
mov eax, dword [esi + 0x14]
sub eax, ecx
cmp dword [esi], 0
je 0x101ffa44
cmp edi, eax
jg 0x101ffa29
push edi
push ebx
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add dword [esi + 0x10], edi
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
call fcn.101ff8e0
push dword [esi]
push edi
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
cmp edi, eax
jle 0x101ffa55
sub edx, eax
mov ecx, esi
call fcn.101ff910
test eax, eax
je 0x101ffa65
push edi
push ebx
push dword [esi + 0x10]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add dword [esi + 0x10], edi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x101ffa70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
mov edi, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
cmp edi, ecx
jne 0x101ffb49
test edi, edi
je 0x101ffb54
mov ecx, dword [esi]
test ecx, ecx
je 0x101ffac5
mov eax, dword [esi + 0x18]
sub edi, eax
push ecx
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov ecx, dword [esi + 0x14]
add esp, 0x10
mov edi, dword [esi + 0x18]
mov eax, ecx
sub eax, edi
mov dword [esi + 0x10], edi
cmp eax, 1
jl 0x101ffb54
jmp 0x101ffb49
mov eax, dword [esi + 0xc]
sub edi, dword [esi + 0x18]
mov edx, dword [eax + 8]
mov ecx, edx
sar ecx, 3
cmp edx, 0x1000000
lea eax, [edx + 0x400]
cmovle ecx, eax
mov eax, 1
cmp ecx, eax
cmovg eax, ecx
mov dword [ebp - 4], eax
mov eax, 0x7fffffff
mov ecx, dword [ebp - 4]
sub eax, edx
cmp ecx, eax
jle 0x101ffb06
mov dword [esi + 4], 3
jmp 0x101ffb58
add edx, ecx
lea eax, [esi + 0xc]
push edx
push eax
mov dword [ebp - 4], edx
call sym.python310.dll__PyBytes_Resize
add esp, 8
test eax, eax
je 0x101ffb33
mov dword [esi + 0x18], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
jmp 0x101ffb58
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 4]
add ecx, 0x10
add eax, ecx
mov dword [esi + 0x18], ecx
add edi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], edi
mov byte [edi], bl
inc dword [esi + 0x10]
mov edi, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
cmp edi, ecx
jne 0x101ffb68
mov edx, 1
mov ecx, esi
call fcn.101ff910
test eax, eax
je 0x101ffb73
mov eax, dword [esi + 0x10]
sar ebx, 8
mov byte [eax], bl
inc dword [esi + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret