joyce8/EMBER2024-capa huggingface dataset:
Function at 0x660fed90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x18
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 7]
cmp ecx, eax
jg 0x660fedae
cmovge eax, ecx
mov esi, eax
mov eax, ecx
mov ecx, esi
movzx esi, byte [edx + 0xb]
cmp eax, esi
jg 0x660fedbd
cmp ecx, esi
cmovl ecx, esi
mov esi, eax
movzx eax, byte [edx + 0xf]
cmp eax, esi
jl 0x660fedcc
cmp ecx, eax
cmovl ecx, eax
mov eax, esi
movzx esi, byte [edx + 0x13]
cmp esi, eax
jl 0x660feddb
cmp ecx, esi
cmovl ecx, esi
mov esi, eax
movzx eax, byte [edx + 0x17]
cmp eax, esi
jl 0x660fedea
cmp ecx, eax
cmovl ecx, eax
mov eax, esi
movzx esi, byte [edx + 0x1b]
cmp esi, eax
jl 0x660fedf9
cmp ecx, esi
cmovl ecx, esi
mov esi, eax
movzx eax, byte [edx + 0x1f]
cmp eax, esi
jl 0x660fee08
cmp ecx, eax
cmovl ecx, eax
mov eax, esi
movzx esi, byte [edx + 0x23]
cmp esi, eax
jl 0x660fee17
cmp ecx, esi
cmovl ecx, esi
mov esi, eax
movzx eax, byte [edx + 0x27]
cmp eax, esi
jl 0x660fee26
cmp ecx, eax
cmovl ecx, eax
mov eax, esi
movzx esi, byte [edx + 0x2b]
cmp eax, esi
jg 0x660fee35
cmp ecx, esi
cmovl ecx, esi
mov esi, eax
movzx eax, byte [edx + 0x2f]
cmp esi, eax
jg 0x660fee44
cmp ecx, eax
cmovl ecx, eax
mov eax, esi
movzx esi, byte [edx + 0x33]
cmp eax, esi
jg 0x660fee53
cmp ecx, esi
cmovl ecx, esi
mov esi, eax
movzx eax, byte [edx + 0x37]
cmp esi, eax
jg 0x660fee62
cmp ecx, eax
cmovl ecx, eax
mov eax, esi
movzx esi, byte [edx + 0x3b]
cmp eax, esi
jg 0x660fee71
cmp ecx, esi
cmovl ecx, esi
mov esi, eax
movzx eax, byte [edx + 0x3f]
cmp eax, esi
jl 0x660fee80
cmp ecx, eax
cmovl ecx, eax
mov eax, esi
lea esi, [ebx + 2]
mov byte [ebx], cl
mov byte [ebx + 1], al
mov dword [esp + 4], esi
cmp ecx, eax
je 0x660fef78
sub ecx, eax
mov esi, ecx
mov dword [esp + 8], ecx
lea ecx, [ecx*4]
mov dword [esp + 0xc], ecx
lea ecx, [esi + esi]
lea ebx, [esi - 1]
mov dword [esp], ecx
mov ecx, esi
sar ecx, 1
add ecx, 2
cmp esi, 7
lea esi, [edx + 3]
cmovle ecx, ebx
lea ebx, [eax*8]
xor ebp, ebp
sub eax, ebx
add eax, ecx
xor ecx, ecx
mov dword [esp + 0x10], eax
lea eax, [edx + 0x43]
mov dword [esp + 0x14], eax
jmp 0x660feefe
mov ebx, dword [esp + 4]
mov eax, ebp
sub ecx, 5
sar ebp, 8
add esi, 4
mov byte [ebx], al
lea eax, [ebx + 1]
mov dword [esp + 4], eax
cmp dword [esp + 0x14], esi
je 0x660fef69
movzx edx, byte [esi]
mov eax, dword [esp + 0x10]
xor ebx, ebx
mov edi, dword [esp + 0xc]
lea eax, [eax + edx*8]
sub eax, edx
cmp edi, eax
setle bl
mov edx, ebx
shl ebx, 2
neg edx
and edx, edi
sub eax, edx
xor edx, edx
cmp dword [esp], eax
setle dl
mov edi, edx
add edx, edx
neg edi
and edi, dword [esp]
or edx, ebx
xor ebx, ebx
sub eax, edi
cmp dword [esp + 8], eax
setle bl
add edx, ebx
neg edx
mov eax, edx
and eax, 7
and edx, 6
sete dl
movzx edx, dl
xor eax, edx
shl eax, cl
or ebp, eax
lea eax, [ecx + 3]
cmp eax, 7
jg 0x660feee0
mov ecx, eax
add esi, 4
cmp dword [esp + 0x14], esi
jne 0x660feefe
add esp, 0x18
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
mov dword [ebx + 4], 0
mov word [ebx + 2], ax
add esp, 0x18
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x660fef90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, eax
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x2c
mov eax, dword [edx]
cmp eax, dword [edx + 4]
jne 0x660ff060
cmp eax, dword [edx + 8]
jne 0x660ff060
cmp eax, dword [edx + 0xc]
jne 0x660ff060
cmp dword [edx + 0x10], eax
jne 0x660ff060
cmp eax, dword [edx + 0x14]
jne 0x660ff060
cmp eax, dword [edx + 0x18]
jne 0x660ff060
cmp eax, dword [edx + 0x1c]
jne 0x660ff060
cmp eax, dword [edx + 0x20]
jne 0x660ff060
cmp eax, dword [edx + 0x24]
jne 0x660ff060
cmp eax, dword [edx + 0x28]
jne 0x660ff060
cmp eax, dword [edx + 0x2c]
jne 0x660ff060
cmp eax, dword [edx + 0x30]
jne 0x660ff060
cmp eax, dword [edx + 0x34]
jne 0x660ff060
cmp eax, dword [edx + 0x38]
jne 0x660ff060
cmp dword [edx + 0x3c], eax
jne 0x660ff060
movzx esi, byte [ebx + 1]
movzx edx, byte [edx]
movzx eax, byte [ebx + 2]
movzx ecx, byte [edx + edx + 0x66238840]
movzx ebx, byte [esi + esi + 0x66238640]
movzx edx, byte [edx + edx + 0x66238841]
shl ebx, 5
shl ecx, 0xb
or ecx, ebx
movzx ebx, byte [eax + eax + 0x66238840]
shl edx, 0xb
movzx eax, byte [eax + eax + 0x66238841]
or ecx, ebx
movzx ebx, byte [esi + esi + 0x66238641]
mov esi, 0xaaaaaaaa
shl ebx, 5
or edx, ebx
or edx, eax
jmp 0x660ff0e9
lea ecx, [esp + 0x16]
lea edx, [esp + 0x14]
mov eax, ebx
xor esi, esi
call fcn.660fda70
movzx edx, word [esp + 0x14]
movzx ecx, word [esp + 0x16]
cmp dx, cx
jne 0x660ff110
mov edi, 2
jmp 0x660ff0c9
movzx edx, word [esp + 0x14]
movzx ecx, word [esp + 0x16]
cmp dx, cx
je 0x660ff140
lea eax, [esp + 0x18]
call fcn.660fd000
xor ecx, ecx
lea edx, [esp + 0x18]
mov eax, ebx
call fcn.660fd110
cmp eax, esi
je 0x660ff0df
cmp edi, 1
je 0x660ff130
mov edi, 1
mov esi, eax
mov dword [esp], esi
lea ecx, [esp + 0x16]
lea edx, [esp + 0x14]
mov eax, ebx
call fcn.660fe5d0
test eax, eax
jne 0x660ff090
movzx ecx, word [esp + 0x14]
movzx edx, word [esp + 0x16]
cmp cx, dx
jae 0x660ff0fa
mov eax, ecx
xor esi, 0x55555555
mov ecx, edx
mov edx, eax
mov dword [ebp + 4], esi
mov word [ebp], cx
mov word [ebp + 2], dx
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x18]
call fcn.660fd000
xor ecx, ecx
lea edx, [esp + 0x18]
mov eax, ebx
call fcn.660fd110
mov esi, eax
jmp 0x660ff084
movzx ecx, word [esp + 0x14]
movzx edx, word [esp + 0x16]
mov esi, eax
jmp 0x660ff0e9
mov edx, ecx
xor esi, esi
jmp 0x660ff0fa
Function at 0x66102370
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call

Disassembly:
push ebp
push edi
mov edi, 5
push esi
push ebx
imul ebx, eax, 0x2c
sub esp, 0x3c
add ebx, dword [0x66238ac0]
mov dword [esp + 0x18], edx
mov esi, dword [ebx]
test byte [ebx + 0x14], 1
je 0x66102399
sub esi, 5
mov edi, 7
lea edx, [esp + 0x2c]
mov dword [esp + 4], edi
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x40
mov dword [esp], esi
call ebp
mov ecx, eax
sub esp, 0x10
mov eax, 0xa
test ecx, ecx
je 0x66102450
movzx eax, byte [ebx + 0x14]
lea edx, [esp + 0x2c]
and eax, 1
mov byte [esp + 0x1f], al
mov eax, dword [esp + 0x18]
test eax, eax
je 0x66102460
mov byte [esi], 0xe9
mov eax, dword [ebx + 4]
lea ecx, [esi + 5]
sub eax, ecx
cmp byte [esp + 0x1f], 0
mov dword [esi + 1], eax
je 0x66102400
mov eax, dword [ebx]
mov ecx, 0xfffff9eb
mov word [eax], cx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], esi
call ebp
sub esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
movzx eax, byte [ebx + 0x14]
sub esp, 0xc
movzx edx, byte [esp + 0x18]
and eax, 0xfffffff9
and edx, 1
lea ecx, [edx + edx]
shl edx, 2
or eax, ecx
or edx, eax
xor eax, eax
mov byte [ebx + 0x14], dl
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0xc]
cmp byte [esp + 0x1f], 0
lea ecx, [ebx + 0xc]
mov dword [esi], eax
je 0x66102480
movzx eax, word [ecx + 4]
mov word [esi + 4], ax
movzx eax, byte [ecx + 6]
mov byte [esi + 6], al
jmp 0x66102400
movzx eax, byte [ecx + 4]
mov byte [esi + 4], al
jmp 0x66102400
Function at 0x66102490
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x4c
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 4
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
sub esp, 8
cmp eax, 0xffffffff
je 0x66102502
lea esi, [esp + 0x24]
mov dword [esp], eax
mov ebx, eax
mov dword [esp + 4], esi
mov dword [esp + 0x24], 0x1c
call sub.KERNEL32.dll_Thread32First
sub esp, 8
test eax, eax
jne 0x661025cf
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [edi]
test eax, eax
je 0x661025fc
mov edx, dword [edi + 8]
test edx, edx
je 0x661025fc
mov ebp, dword [sym.imp.KERNEL32.dll_OpenThread]
xor esi, esi
nop
mov eax, dword [eax + esi*4]
mov dword [esp + 4], 0
mov dword [esp], 0x5a
mov dword [esp + 8], eax
call ebp
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x661025f0
mov dword [esp], eax
add esi, 1
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov eax, ebx
sub esp, 4
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
call fcn.66102020
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
cmp dword [edi + 8], esi
jbe 0x661025fc
mov eax, dword [edi]
jmp 0x66102520
mov ebp, dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp ebp, eax
je 0x661025b0
mov eax, dword [edi]
test eax, eax
je 0x66102648
mov edx, dword [edi + 8]
mov ecx, dword [edi + 4]
cmp edx, ecx
jae 0x66102608
lea ecx, [edx + 1]
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0x2c]
mov dword [eax + edx*4], ecx
nop
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x24], 0x1c
call sub.KERNEL32.dll_Thread32Next
sub esp, 8
test eax, eax
je 0x661024f6
cmp dword [esp + 0x24], 0xf
jbe 0x661025b0
mov ebp, dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp ebp, eax
jne 0x661025b0
jmp 0x66102580
add esi, 1
cmp esi, dword [edi + 8]
jb 0x66102578
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], eax
mov eax, dword [0x66238acc]
shl ecx, 3
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
sub esp, 0x10
test eax, eax
je 0x661024f6
mov dword [edi], eax
shl dword [edi + 4], 1
mov edx, dword [edi + 8]
jmp 0x661025a2
mov eax, dword [0x66238acc]
mov dword [edi + 4], pe_nt_image_headers32
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi], eax
sub esp, 0xc
test eax, eax
jne 0x66102639
jmp 0x661024f6
Function at 0x66102680
Capabilities:
Resume thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ecx, dword [0x66238ac8]
test ecx, ecx
je 0x661027a0
mov edx, dword [0x66238ac0]
mov esi, eax
xor ebx, ebx
jmp 0x661026b6
add ebx, 1
add edx, 0x2c
cmp ebx, ecx
je 0x661027a0
movzx eax, byte [edx + 0x14]
shr al, 1
and eax, 1
cmp eax, esi
je 0x661026a8
mov edx, 0xffffffff
mov ecx, esi
lea eax, [esp + 0x14]
call fcn.66102490
mov edx, dword [0x66238ac8]
cmp ebx, edx
jae 0x66102712
lea esi, [esi]
imul eax, ebx, 0x2c
add eax, dword [0x66238ac0]
movzx eax, byte [eax + 0x14]
shr al, 1
and eax, 1
cmp eax, esi
je 0x6610270b
mov edx, esi
mov eax, ebx
call fcn.66102370
mov edi, eax
test eax, eax
jne 0x66102714
mov edx, dword [0x66238ac8]
add ebx, 1
cmp ebx, edx
jb 0x661026e0
xor edi, edi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x661027a2
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x66102776
mov ebx, dword [sym.imp.KERNEL32.dll_OpenThread]
xor esi, esi
mov eax, dword [eax + esi*4]
mov dword [esp + 4], 0
mov dword [esp], 0x5a
mov dword [esp + 8], eax
call ebx
sub esp, 0xc
mov ebp, eax
test eax, eax
je 0x661027b0
mov dword [esp], eax
add esi, 1
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x1c], esi
ja 0x66102730
mov dword [esp + 8], eax
mov eax, dword [0x66238acc]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
sub esp, 0xc
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
xor edi, edi
add esp, 0x2c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x14]
add esi, 1
cmp esi, dword [esp + 0x1c]
jb 0x66102730
jmp 0x66102776
Function at 0x661027d0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, eax
push edi
xor edi, edi
push esi
mov esi, 1
push ebx
sub esp, 0x3c
mov dword [esp + 0x1c], edx
jmp 0x66102803
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
add edi, 1
xor eax, eax
lock cmpxchg dword [0x66238ad0], esi
mov ebx, eax
test eax, eax
je 0x66102830
cmp edi, 0x1f
jbe 0x661027f0
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x66102800
mov ecx, dword [0x66238acc]
test ecx, ecx
je 0x66102968
test ebp, ebp
je 0x66102970
mov edx, dword [0x66238ac8]
mov eax, dword [0x66238ac0]
xor esi, esi
test edx, edx
jne 0x6610286e
jmp 0x66102938
add esi, 1
add eax, 0x2c
cmp edx, esi
je 0x66102938
cmp dword [eax], ebp
jne 0x66102860
movzx eax, byte [eax + 0x14]
mov edi, dword [esp + 0x1c]
shr al, 1
and eax, 1
cmp eax, edi
je 0x66102940
mov edx, esi
mov ecx, 1
lea eax, [esp + 0x24]
call fcn.66102490
mov eax, esi
mov edx, edi
call fcn.66102370
mov esi, eax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x66102923
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x66102906
mov edi, dword [sym.imp.KERNEL32.dll_OpenThread]
lea esi, [esi]
nop
mov eax, dword [eax + ebx*4]
mov dword [esp + 4], 0
mov dword [esp], 0x5a
mov dword [esp + 8], eax
call edi
sub esp, 0xc
mov ebp, eax
test eax, eax
je 0x66102950
mov dword [esp], eax
add ebx, 1
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x2c], ebx
ja 0x661028c0
mov dword [esp + 8], eax
mov eax, dword [0x66238acc]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
sub esp, 0xc
xor eax, eax
xchg dword [0x66238ad0], eax
add esp, 0x3c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, 4
jmp 0x66102923
mov esi, 6
sub esi, dword [esp + 0x1c]
jmp 0x66102923
mov eax, dword [esp + 0x24]
add ebx, 1
cmp ebx, dword [esp + 0x2c]
jb 0x661028c0
jmp 0x66102906
mov esi, 2
jmp 0x66102923
mov eax, dword [esp + 0x1c]
call fcn.66102680
mov esi, eax
jmp 0x66102923
Function at 0x6610a220
Capabilities:
Allocate or change rwx memory

Disassembly:
push esi
push ebx
sub esp, 0x14
mov ebx, dword [0x66238ad4]
test ebx, ebx
jne 0x6610a23e
jmp 0x6610a260
mov ebx, dword [ebx]
test ebx, ebx
je 0x6610a260
mov eax, dword [ebx + 4]
test eax, eax
je 0x6610a238
mov esi, dword [ebx + 8]
mov ecx, dword [eax]
lea edx, [esi + 1]
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
add esp, 0x14
pop ebx
pop esi
ret
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov dword [esp + 4], 0x1000
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
sub esp, 0x10
xor eax, eax
test ebx, ebx
je 0x6610a253
mov dword [ebx + 8], 0
lea eax, [ebx + 0x20]
lea esi, [ebx + 0x1000]
xor ecx, ecx
jmp 0x6610a2ac
mov ecx, eax
mov eax, edx
lea edx, [eax + 0x20]
mov dword [eax], ecx
cmp edx, esi
jne 0x6610a2a8
mov edx, dword [0x66238ad4]
lea eax, [ebx + 0xfe0]
mov dword [ebx + 4], eax
mov dword [ebx], edx
mov edx, 1
mov dword [0x66238ad4], ebx
jmp 0x6610a24d

Function at 0x66113c60
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.66127b40
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.66127b40
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 0x66113cc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x66238af4]
test esi, esi
jle 0x66113de0
mov eax, dword [0x66238af8]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x66113cf4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x66113d77
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x66113ce0
mov dword [esp], ebx
call fcn.66114430
mov edi, eax
test eax, eax
je 0x66113e07
mov eax, dword [0x66238af8]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.66114540
mov edx, dword [0x66238af8]
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 0x66113de7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x66113d70
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x66113d80
add dword [0x66238af4], 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 [0x66238af8]
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 0x66113d70
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.66113c60
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x66113cfe
mov eax, dword [0x66238af8]
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.66113c60
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.66113c60
lea esi, [esi]
nop

Function at 0x661140a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x66238b04
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x66238afc]
sub esp, 4
test ebx, ebx
je 0x661140f5
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 0x661140ee
test esi, esi
je 0x661140ee
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x661140d0
mov dword [esp], 0x66238b04
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x66129c50
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x661dc348], eax
cmp eax, 0xffffffff
je 0x661d4170
add esp, 0xc
ret

Function at 0x6612a230
Capabilities:
Print debug messages

Disassembly:
test eax, eax
je 0x6612a260
push edi
push esi
push ebx
mov ebx, eax
add esp, 0xffffff80
mov dword [esp], eax
call fcn.66129b10
cmp eax, 1
je 0x6612a261
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 0x6612a2b5
jmp 0x6612a2c3
cmp eax, 0x6a
je 0x6612a2cd
add eax, 1
cmp byte [ebx + eax], 0
jne 0x6612a2b0
cmp eax, 0x6a
je 0x6612a2cd
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 0x6612a2e0
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 [0x66239570], 1
je 0x6612a2f5
call fcn.6612a1a0
mov eax, dword [0x661dc348]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x6612a320
add esp, 0x2c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.6612a0e0
mov esi, eax
mov eax, dword [entry3]
test eax, eax
je 0x6612a30c
test esi, esi
je 0x6612a30c
mov dword [esi + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 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 [esi + 0x1c], 0xffffffff
mov dword [esi + 0x18], eax
sub esp, 0x10
lea eax, [esi + 0x38]
call fcn.6612a230
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esi + 0x64], 0
mov dword [esi + 0x14], 0
call ebp
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov ebx, eax
call ebp
lea edx, [esi + 0x14]
mov dword [esp + 8], edi
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x661d4175
mov eax, dword [esi + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [esi + 0x68], 0
mov dword [esi + 0x6c], eax
movzx eax, byte [esi + 0x20]
sub esp, 4
and eax, 0xffffffcf
or eax, 0x10
mov byte [esi + 0x20], al
mov eax, dword [0x661dc348]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x661d4175
add esp, 0x2c
mov ebx, esi
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x6612a570
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 0x6612a5a0
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x6612a650
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x6612a680
cmp eax, 3
jne 0x6612a58a
mov eax, dword [0x661dc348]
cmp eax, 0xffffffff
je 0x6612a58a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x6612a58a
test byte [eax + 0x20], 0x30
je 0x6612a6b0
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x6612a5e3
call fcn.6612a470
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x6612a615
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 0x6612a607
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.66129950
lea eax, [ebx + 0x38]
call fcn.6612a230
mov eax, ebx
call fcn.66129e60
mov eax, dword [0x661dc348]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x6612a58a
mov eax, dword [0x6623954c]
test eax, eax
je 0x6612a58a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x6623954c], 0
sub esp, 4
jmp 0x6612a58a
mov dword [esp + 4], 0x66129b80
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x6623954c], 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 0x6612a728
test eax, eax
je 0x6612a6ca
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 0x6612a6e7
call fcn.6612a470
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x6612a760
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x6612a70c
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.66129950
mov eax, esi
jmp 0x6612a623
test eax, eax
je 0x6612a738
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.66129950
lea eax, [ebx + 0x38]
call fcn.6612a230
jmp 0x6612a58a
mov dword [esp], edi
call fcn.66129950
mov eax, esi
call fcn.6612a230
jmp 0x6612a58a