joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100193d0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x78
mov eax, dword [ebp + 8]
mov edi, ecx
xorps xmm0, xmm0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 7
movsd qword [esp + 0x32], xmm0
movsd qword [esp + 0x2c], xmm0
mov byte [esp + 0x34], 1
lea esi, [esp + 0x18]
lea ecx, [esp + 0x10]
push esi
push eax
call fcn.10037b90
add esp, 8
cmp byte [esp + 0x10], 4
jne 0x10019434
mov esi, dword [esp + 0x14]
jmp 0x10019441
movzx eax, byte [esp + 0x10]
mov esi, dword [esp + 0x14]
cmp al, 4
jne 0x100194b5
lea ebx, [esp + 0x18]
mov edx, esi
mov ecx, ebx
call fcn.10037d90
mov eax, dword [esp + 0x18]
xor eax, 2
or eax, dword [esp + 0x1c]
jne 0x100194a3
cmp byte [esp + 0x20], 3
jne 0x100194aa
mov eax, dword [esp + 0x24]
mov dword [esp + 4], edi
mov edi, dword [eax + 4]
mov ebx, dword [eax]
mov dword [esp + 0xc], eax
mov eax, dword [edi]
test eax, eax
je 0x1001947f
push ebx
call eax
add esp, 4
cmp dword [edi + 4], 0
je 0x1001948f
mov edx, dword [edi + 8]
mov ecx, ebx
call fcn.10006c20
mov ecx, dword [esp + 0xc]
mov edx, 4
call fcn.10006c20
mov edi, dword [esp + 4]
jmp 0x100194aa
cmp dword [esp + 0x54], 0
je 0x100194fa
mov dword [edi], 0
jmp 0x100195a1
cmp al, 3
jne 0x100194ef
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
test eax, eax
je 0x100194d1
push dword [esp + 4]
call eax
add esp, 4
mov ecx, dword [esp + 4]
cmp dword [ebx + 4], 0
je 0x100194e3
mov edx, dword [ebx + 8]
call fcn.10006c20
mov ecx, esi
mov edx, 4
call fcn.10006c20
mov dword [edi], 0
jmp 0x100195a7
mov eax, dword [esp + 0x50]
test esi, esi
mov dword [esp + 0xc], eax
je 0x1001952c
mov dword [esp + 0x18], 0
call sub.KERNEL32.dll_GetCurrentProcess
push 2
push 0
push 0
push ebx
push eax
push esi
push eax
call sub.KERNEL32.dll_DuplicateHandle
test eax, eax
je 0x10019596
mov eax, dword [esp + 0x18]
jmp 0x1001952e
xor eax, eax
push 0
push 0
push 0
push 2
push 0
mov dword [esp + 0x1c], eax
push eax
call sub.KERNEL32.dll_CreateFileMappingA
test eax, eax
je 0x10019585
push dword [esp + 0xc]
push 0
push 0
push 4
push eax
mov dword [esp + 0x18], edi
mov edi, eax
call sub.KERNEL32.dll_MapViewOfFile
mov ebx, eax
push edi
mov edi, dword [esp + 8]
call sub.KERNEL32.dll_CloseHandle
test ebx, ebx
je 0x10019585
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [edi + 4], eax
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ecx
mov dword [edi], 1
jmp 0x100195a1
mov dword [edi], 0
push dword [esp + 8]
call sub.KERNEL32.dll_CloseHandle
jmp 0x100195a1
call sub.KERNEL32.dll_GetLastError
mov dword [edi], 0
push esi
call sub.KERNEL32.dll_CloseHandle
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x100393d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4c
call fcn.100393de

Function at 0x1003a0c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x34
mov eax, dword [ebp + 8]
mov esi, ecx
mov ecx, dword [ebp + 0xc]
mov edi, edx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0x103
lea edx, [ebp - 0x14]
push 0
push 0
push ecx
push eax
push edx
push 0
push 0
push 0
push edi
call sub.ntdll.dll_NtReadFile
cmp eax, 0x103
jne 0x1003a108
push 0xffffffffffffffff
push edi
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x14]
cmp eax, 0xc0000011
jne 0x1003a118
mov dword [esi + 4], 0
jmp 0x1003a129
cmp eax, 0x103
je 0x1003a141
test eax, eax
js 0x1003a133
mov eax, dword [ebp - 0x10]
mov dword [esi + 4], eax
mov byte [esi], 4
add esp, 0x34
pop esi
pop edi
pop ebp
ret
push eax
call sub.ntdll.dll_RtlNtStatusToDosError
mov byte [esi], 0
mov dword [esi + 4], eax
jmp 0x1003a12c
lea eax, [ebp - 0xc]
mov dword [ebp - 0x34], 0x1007cb2c
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x1c]
lea esi, [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x28], 0
push eax
push ecx
push esi
call fcn.10014770
add esp, 0xc
mov ecx, esi
call fcn.10014880
mov ecx, 7
int 0x29
ud2

Function at 0x1003c000
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push eax
mov esi, ecx
test ecx, ecx
jne 0x1003c017
movzx eax, byte [0x1008b030]
test al, al
je 0x1003c034
mov byte [0x1008b030], 1
call fcn.1003c080
test eax, eax
je 0x1003c038
mov ecx, dword [eax]
mov dword [eax], esi
mov eax, ecx
add esp, 4
pop esi
pop edi
pop ebp
ret
xor ecx, ecx
jmp 0x1003c02b
test esi, esi
je 0x1003c048
lock dec dword [esi]
jne 0x1003c048
mov ecx, esi
call fcn.1003c130
lea eax, [ebp - 9]
mov ecx, 0x1007b983
mov edx, 0x46
push 0x1007bf08
push 0x1007af18
push eax
call fcn.10008f10
mov edi, eax
test esi, esi
je 0x1003c077
lock dec dword [esi]
jne 0x1003c077
mov ecx, esi
call fcn.1003c130
push edi
call fcn.1004d8d0
nop dword [eax]
Function at 0x1003c080
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov esi, dword [0x1005c034]
test esi, esi
je 0x1003c104
dec esi
push esi
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
ja 0x1003c0fc
je 0x1003c0fa
movzx eax, byte [0x1008b0d4]
xor ecx, ecx
mov edx, 8
call fcn.10045ab0
test eax, eax
je 0x1003c112
mov dword [eax], 0
mov dword [eax + 4], esi
push esi
mov ebx, eax
call sub.KERNEL32.dll_TlsGetValue
mov edi, eax
mov dword [ebp - 0x10], ebx
push ebx
push esi
call sub.KERNEL32.dll_TlsSetValue
test edi, edi
je 0x1003c0f5
mov eax, dword [edi]
test eax, eax
je 0x1003c0e9
lock dec dword [eax]
jne 0x1003c0e9
mov ecx, dword [edi]
call fcn.1003c130
mov ecx, edi
mov edx, 4
call fcn.10006c20
mov eax, dword [ebp - 0x10]
jmp 0x1003c0fc
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, 0x1005c034
call fcn.10015a00
mov esi, eax
jmp 0x1003c092
mov ecx, 4
mov edx, 8
call fcn.10007010
nop word cs:[eax + eax]
nop dword [eax + eax]
Function at 0x100423c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov esi, ecx
lea ecx, [ebp - 0x28]
push dword [ebp + 8]
call fcn.10037e80
add esp, 4
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x20]
cmp ecx, 0x80000000
je 0x10042410
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edi
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x34]
call fcn.100422f0
mov ebx, dword [ebp - 0x1c]
cmp ebx, 0x80000000
jne 0x10042455
movzx eax, byte [ebp - 0x18]
mov edi, dword [ebp - 0x14]
cmp al, 3
jne 0x10042447
mov ebx, dword [edi + 4]
mov dword [ebp - 0x10], esi
mov esi, dword [edi]
mov eax, dword [ebx]
test eax, eax
je 0x10042428
push esi
call eax
add esp, 4
cmp dword [ebx + 4], 0
je 0x10042438
mov edx, dword [ebx + 8]
mov ecx, esi
call fcn.10006c20
mov ecx, edi
mov edx, 4
call fcn.10006c20
mov esi, dword [ebp - 0x10]
mov dword [esi], 0x80000000
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
push edi
call sub.KERNEL32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x10042476
mov eax, dword [ebp - 0x10]
mov dword [esi], ebx
mov dword [esi + 4], edi
mov dword [esi + 8], eax
jmp 0x1004244d
test ebx, ebx
mov dword [esi], 0x80000000
je 0x1004244d
mov ecx, edi
mov edx, 2
call fcn.10006c20
jmp 0x1004244d
Function at 0x10044080
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x1024
call fcn.1004b0b0
mov esi, edx
mov edi, ecx
lea ebx, [ebp - 0x1030]
push 0x1000
push 0
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
xorps xmm0, xmm0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
push 0x1003c8b0
push eax
push 0x1000
push ebx
mov dword [ebp - 0x10], edi
push edi
call sub.KERNEL32.dll_ReadFileEx
test eax, eax
je 0x1004419d
push 1
push 0xffffffffffffffff
call sub.KERNEL32.dll_SleepEx
cmp dword [ebp - 0x1c], 0
je 0x100440de
cmp dword [ebp - 0x18], 0
jne 0x100441a4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x100441a4
cmp ebx, 0x1000
ja 0x100441d0
xor edi, edi
mov eax, ebx
sub eax, edi
jb 0x100441bd
xorps xmm0, xmm0
lea edx, [ebp - 0x1c]
lea ecx, [ebp + edi - 0x1030]
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x20], edx
push 0x1003c8b0
lea edx, [ebp - 0x30]
push edx
push eax
push ecx
push esi
call sub.KERNEL32.dll_WriteFileEx
test eax, eax
je 0x1004419f
nop word [eax + eax]
push 1
push 0xffffffffffffffff
call sub.KERNEL32.dll_SleepEx
cmp dword [ebp - 0x1c], 0
je 0x10044150
cmp dword [ebp - 0x18], 0
jne 0x100441a4
add edi, dword [ebp - 0x14]
cmp edi, ebx
jne 0x10044110
xorps xmm0, xmm0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x20], eax
push 0x1003c8b0
lea eax, [ebp - 0x30]
push eax
push 0x1000
lea eax, [ebp - 0x1030]
push eax
push dword [ebp - 0x10]
jmp 0x100440d1
jmp 0x1004419f
call sub.KERNEL32.dll_GetLastError
push dword [ebp - 0x10]
call sub.KERNEL32.dll_CloseHandle
push esi
call sub.KERNEL32.dll_CloseHandle
add esp, 0x1024
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, ebx
mov ecx, edi
push 0x1007cd04
call fcn.10009010
add esp, 4
jmp 0x100441e4
mov edx, 0x1000
mov ecx, ebx
push 0x1007cd04
call fcn.10007fd0
add esp, 4
ud2

Function at 0x100494f4
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx]
add edx, dword [eax + 8]
jb 0x1004950a
cmp edx, dword [eax + 0xc]
ja 0x1004950f
mov dword [eax + 8], edx
mov eax, ecx
pop ebp
ret
call fcn.10008610
push 0x29
pop edx
mov ecx, str.assertion_failed:_filled___self.buf.init_rustc_eeb90cda1969383f56a2637cbd3037bdf598841clibrarycore_srcio_borrowed_buf.rs
push 0x1007db48
call fcn.10008230

Function at 0x1004fc60
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1005c080], eax
cmp eax, 0xffffffff
je 0x1005a390
add esp, 0xc
ret
Function at 0x10050170
Capabilities:
Print debug messages

Disassembly:
test eax, eax
je 0x100501a0
push edi
push esi
push ebx
mov ebx, eax
add esp, 0xffffff80
mov dword [esp], eax
call fcn.100532c0
cmp eax, 1
je 0x100501a1
mov dword [ebx], 0xffffffff
sub esp, 0xffffff80
pop ebx
pop esi
pop edi
ret
ret
lea ebx, [esp + 0x15]
xor eax, eax
mov esi, str.Error_cleaning_up_spin_keys_for_thread
mov ecx, 0xa
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x3d]
mov ecx, 0x43
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
mov eax, 0x27
jne 0x100501f5
jmp 0x10050203
cmp eax, 0x6a
je 0x1005020d
add eax, 1
cmp byte [ebx + eax], 0
jne 0x100501f0
cmp eax, 0x6a
je 0x1005020d
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + eax + 0x16], 0
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x100502b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
cmp dword [0x1008b138], 1
je 0x100502c5
call fcn.10050220
mov eax, dword [0x1005c080]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
test eax, eax
je 0x100502f0
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.100500c0
mov ebx, eax
mov eax, dword [entry4]
test eax, eax
je 0x100502dc
test ebx, ebx
je 0x100502dc
mov dword [ebx + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x1c], 0xffffffff
mov dword [ebx + 0x18], eax
sub esp, 0x10
lea eax, [ebx + 0x38]
call fcn.10050170
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebx + 0x64], 0
mov dword [ebx + 0x14], 0
call esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
call esi
lea edx, [ebx + 0x14]
mov dword [esp + 8], ebp
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x1005a395
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], eax
movzx eax, byte [ebx + 0x20]
sub esp, 4
and eax, 0xffffffcf
or eax, 0x10
mov byte [ebx + 0x20], al
mov eax, dword [0x1005c080]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x1005a395
add esp, 0x2c
mov esi, ebx
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x10050530
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x10050560
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x10050610
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x10050640
cmp eax, 3
jne 0x1005054a
mov eax, dword [0x1005c080]
cmp eax, 0xffffffff
je 0x1005054a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x1005054a
test byte [eax + 0x20], 0x30
je 0x10050670
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x100505a3
call fcn.10050440
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x100505d5
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x100505c7
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.1004f9e0
lea eax, [ebx + 0x38]
call fcn.10050170
mov eax, ebx
call fcn.1004fe50
mov eax, dword [0x1005c080]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x1005054a
mov eax, dword [0x1008b114]
test eax, eax
je 0x1005054a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x1008b114], 0
sub esp, 4
jmp 0x1005054a
mov dword [esp + 4], 0x1004fb90
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x1008b114], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x100506e2
test eax, eax
je 0x1005068a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x68], 1
test eax, eax
je 0x100506a7
call fcn.10050440
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x10050711
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x100506cc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], edi
call fcn.1004f9e0
mov eax, esi
jmp 0x100505e3
test eax, eax
je 0x100506f2
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call fcn.1004f9e0
lea eax, [ebx + 0x38]
call fcn.10050170
jmp 0x1005054a
mov dword [esp], edi
call fcn.1004f9e0
mov eax, esi
call fcn.10050170
jmp 0x1005054a
Function at 0x100510a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call fcn.100502b0
mov ebx, eax
mov dword [eax + 4], esi
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x100510c2
call fcn.10050440
test byte [ebx + 0x20], 0x30
jne 0x100510db
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call sub.msvcrt.dll_longjmp
mov eax, dword [0x1005c080]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push edx
test eax, eax
je 0x1005111e
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x10051162
mov esi, dword [ebx + 4]
mov dword [ebx + 0x68], 1
test eax, eax
je 0x10051111
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x10051127
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov dword [ebx + 0x14], 0
mov eax, ebx
call fcn.1004fe50
mov eax, dword [0x1005c080]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push eax
jmp 0x1005111e
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x10051176
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jmp 0x10051141

Function at 0x10054d00
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.10054910
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.10054910
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x10054d60
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x1008b16c]
test esi, esi
jle 0x10054e80
mov edi, dword [0x1008b170]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x10054d94
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x10054e19
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x10054d80
mov dword [esp], eax
mov ebx, eax
call fcn.10055550
mov edi, eax
test eax, eax
je 0x10054ea7
mov eax, dword [0x1008b170]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.10055660
mov edx, dword [0x1008b170]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x10054e87
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x10054e12
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x10054e20
add dword [0x1008b16c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x1008b170]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x10054e12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.10054d00
lea esi, [esi]
lea edi, [edi]
xor esi, esi
jmp 0x10054d9e
mov eax, dword [0x1008b170]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.10054d00
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.10054d00
mov esi, esi
lea edi, [edi]

Function at 0x10055190
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x1008b17c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x1008b174]
sub esp, 4
test ebx, ebx
je 0x100551e5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x100551de
test esi, esi
je 0x100551de
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x100551c0
mov dword [esp], 0x1008b17c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x403860
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x10054
call fcn.00419c00
mov eax, dword [0x444440]
xor eax, esp
mov dword [esp + 0x10050], eax
mov eax, dword [esp + 0x10058]
xor ecx, ecx
push 0x28
push eax
lea eax, [esp + 8]
mov word [esp + 0x58], cx
push eax
mov word [esp + 0xc], cx
call fcn.00415bd0
add esp, 0xc
lea eax, [esp + 0x50]
push 0x10000
push eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4038dd
cmp eax, 0x10000
ja 0x4038dd
lea eax, [esp + 0x50]
push eax
call fcn.00422b08
add esp, 4
mov ecx, dword [esp + 0x10050]
xor ecx, esp
call fcn.00419be9
add esp, 0x10054
ret
mov ecx, dword [esp + 0x10050]
xor eax, eax
xor ecx, esp
call fcn.00419be9
add esp, 0x10054
ret

Function at 0x403980
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x54
mov eax, dword [0x444440]
xor eax, esp
mov dword [esp + 0x50], eax
push esi
push 0x431934
call fcn.00403860
mov dword [0x44541c], eax
xor eax, eax
push 0x28
mov word [esp + 0xc], ax
lea eax, [esp + 0xc]
push 0x431934
push eax
call fcn.00415bd0
add esp, 0x10
lea eax, [esp + 4]
push 0x43193c
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push str.PYTHONHOME
call fcn.00403860
push 1
mov dword [0x445420], eax
call fcn.00416be0
mov esi, eax
xor eax, eax
push 0x28
mov word [esp + 0x10], ax
lea eax, [esp + 0x10]
push str.PYTHONHOME
push eax
call fcn.00415bd0
add esp, 0x14
lea eax, [esp + 4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 1
call fcn.00416be0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
mov eax, dword [sym.imp.python38.dll__Py_path_config]
mov ecx, dword [esp + 0x54]
pop esi
xor ecx, esp
mov dword [eax + 0x18], 1
call fcn.00419be9
add esp, 0x54
ret
Function at 0x403cf0
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x54
mov eax, dword [0x444440]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
mov ebp, dword [esp + 0x64]
push esi
push edi
call fcn.0040d740
push str.environ
push eax
call dword [sym.imp.python38.dll_PyObject_GetAttrString]
push ebx
mov esi, eax
call dword [sym.imp.python38.dll_PyUnicode_FromString]
add esp, 0xc
mov edi, eax
xor eax, eax
mov word [esp + 0x10], ax
lea eax, [esp + 0x10]
push 0x28
push ebx
push eax
call fcn.00415bd0
add esp, 0xc
lea eax, [esp + 0x10]
test ebp, ebp
je 0x403d90
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0xffffffffffffffff
push ebp
call sub.python38.dll_PyUnicode_FromWideChar
mov ebx, eax
push ebx
push edi
push esi
call dword [sym.imp.python38.dll_PyObject_SetItem]
add esp, 0x14
test eax, eax
je 0x403d7d
push 1
call dword [sym.imp.python38.dll_PyErr_PrintEx]
add esp, 4
push 1
call dword [sym.imp.python38.dll_Py_Exit]
add dword [ebx], 0xffffffff
jne 0x403dad
mov eax, dword [ebx + 4]
push ebx
mov eax, dword [eax + 0x18]
call eax
add esp, 4
jmp 0x403dad
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
push esi
call dword [sym.imp.python38.dll_PyObject_DelItem]
add esp, 8
test eax, eax
je 0x403dad
call fcn.00403530
add dword [edi], 0xffffffff
jne 0x403dbe
mov eax, dword [edi + 4]
push edi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
add dword [esi], 0xffffffff
jne 0x403dcf
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00419be9
add esp, 0x54
ret