joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c4160
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x14
call fcn.005f62e0
mov eax, dword [esp + 0x2c]
push esi
mov esi, dword [eax]
test esi, esi
jns 0x4c4180
mov dword [eax], 0xffffffff
pop esi
add esp, 0x14
ret
push ebx
mov ebx, dword [esp + 0x24]
push ebp
mov ebp, dword [esp + 0x24]
push edi
mov edi, dword [esp + 0x30]
test esi, esi
je 0x4c41ac
mov ecx, dword [esp + 0x38]
test edi, edi
je 0x4c41ac
mov al, byte [esi + ecx]
dec edi
xor al, byte [ebp]
inc esi
mov byte [ebx], al
inc ebp
inc ebx
and esi, 0xf
jne 0x4c4197
mov edx, dword [esp + 0x40]
cmp edi, 0x10
jb 0x4c4245
mov ecx, dword [esp + 0x38]
mov eax, ebx
sub eax, ecx
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, edi
shr eax, 4
mov dword [esp + 0x10], eax
shl eax, 4
add ebx, eax
add ebp, eax
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x18]
jmp 0x4c41f4
mov ecx, dword [esp + 0x38]
push dword [esp + 0x34]
push ecx
push ecx
call edx
add esp, 0xc
cmp esi, 0x10
jae 0x4c4227
mov eax, dword [esp + 0x38]
mov edx, 0xf
sub edx, esi
add eax, esi
shr edx, 2
inc edx
mov ecx, dword [eax + ebp]
lea eax, [eax + 4]
xor ecx, dword [eax - 4]
mov dword [ebx + eax - 4], ecx
sub edx, 1
jne 0x4c4215
mov edx, dword [esp + 0x40]
sub edi, 0x10
add ebx, 0x10
add ebp, 0x10
xor esi, esi
sub dword [esp + 0x10], 1
jne 0x4c41f0
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
test edi, edi
je 0x4c4277
push dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
push eax
push eax
call edx
mov eax, dword [esp + 0x44]
add esp, 0xc
sub ebp, eax
sub ebx, eax
lea ecx, [esi + eax]
add esi, edi
mov al, byte [ecx + ebp]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [ecx + ebx - 1], al
sub edi, 1
jne 0x4c4265
mov eax, dword [esp + 0x3c]
pop edi
pop ebp
pop ebx
mov dword [eax], esi
pop esi
add esp, 0x14
ret
Function at 0x4c4a20
Capabilities:
Encode data using xor

Disassembly:
mov eax, 4
call fcn.005f62e0
push ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [ebp + 0x38]
or eax, dword [ebp + 0x3c]
je 0x4c4a3f
mov eax, 0xfffffffe
pop ebp
pop ecx
ret
push esi
mov esi, dword [esp + 0x18]
xor ecx, ecx
mov eax, esi
add eax, dword [ebp + 0x30]
adc ecx, dword [ebp + 0x34]
cmp ecx, 0x20000000
ja 0x4c4b10
jb 0x4c4a64
test eax, eax
jne 0x4c4b10
push ebx
mov dword [ebp + 0x34], ecx
mov ecx, dword [ebp + 0x170]
mov dword [ebp + 0x30], eax
mov dword [esp + 0x14], ecx
push edi
mov edi, dword [esp + 0x1c]
test ecx, ecx
je 0x4c4ab3
nop
test esi, esi
je 0x4c4b02
mov al, byte [edi]
dec esi
xor byte [ecx + ebp + 0x40], al
inc edi
inc ecx
and ecx, 0xf
mov dword [esp + 0x18], ecx
jne 0x4c4a80
lea eax, [ebp + 0x60]
push eax
mov eax, dword [ebp + 0x168]
lea ebx, [ebp + 0x40]
push ebx
call eax
mov eax, dword [esp + 0x20]
add esp, 8
mov dword [esp + 0x18], eax
jmp 0x4c4ab6
lea ebx, [ebp + 0x40]
mov eax, esi
lea ecx, [ebp + 0x60]
and eax, 0xfffffff0
mov dword [esp + 0x10], eax
je 0x4c4adb
push eax
mov eax, dword [ebp + 0x164]
push edi
push ecx
push ebx
call eax
add edi, dword [esp + 0x20]
add esp, 0x10
sub esi, dword [esp + 0x10]
test esi, esi
je 0x4c4afe
mov ecx, esi
mov al, byte [edi]
lea edi, [edi + 1]
xor byte [ebx], al
lea ebx, [ebx + 1]
sub esi, 1
jne 0x4c4ae1
pop edi
pop ebx
pop esi
mov dword [ebp + 0x170], ecx
xor eax, eax
pop ebp
pop ecx
ret
mov ecx, dword [esp + 0x18]
pop edi
pop ebx
pop esi
mov dword [ebp + 0x170], ecx
xor eax, eax
pop ebp
pop ecx
ret
pop esi
or eax, 0xffffffff
pop ebp
pop ecx
ret
Function at 0x4c5ab0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov dword [esi + 0x30], 0
lea ebp, [esi + 0x40]
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x170], 0
mov dword [esi + 0x16c], 0
cmp ebx, 0xc
jne 0x4c5b15
mov eax, dword [esp + 0x18]
lea edi, [ebx - 0xb]
movq xmm0, qword [eax]
movq qword [esi], xmm0
mov eax, dword [eax + 8]
mov dword [esi + 8], eax
mov dword [esi + 0xc], 0x1000000
jmp 0x4c5c12
mov edi, dword [esp + 0x18]
lea edx, [esi + 0x60]
mov dword [ebp], 0
mov dword [ebp + 4], 0
mov dword [esi + 0x48], 0
mov dword [esp + 0x1c], ebx
mov dword [esi + 0x4c], 0
cmp ebx, 0x10
jb 0x4c5bad
mov eax, ebx
lea ecx, [esi + 0x41]
shr eax, 4
mov dword [esp + 0x14], eax
nop dword [eax]
lea edx, [edi + 2]
mov eax, ecx
mov ebp, 4
nop word [eax + eax]
movzx ecx, byte [edx - 2]
lea edx, [edx + 4]
xor byte [eax - 1], cl
lea eax, [eax + 4]
movzx ecx, byte [edx - 5]
xor byte [eax - 4], cl
movzx ecx, byte [edx - 4]
xor byte [eax - 3], cl
movzx ecx, byte [edx - 3]
xor byte [eax - 2], cl
sub ebp, 1
jne 0x4c5b60
lea eax, [esi + 0x60]
push eax
mov eax, dword [esi + 0x168]
lea ebp, [esi + 0x40]
push ebp
call eax
add esp, 8
lea ecx, [esi + 0x41]
add edi, 0x10
sub ebx, 0x10
sub dword [esp + 0x14], 1
jne 0x4c5b50
lea edx, [esi + 0x60]
test ebx, ebx
je 0x4c5bcf
mov ecx, ebp
mov al, byte [edi]
lea edi, [edi + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub ebx, 1
jne 0x4c5bb3
mov eax, dword [esi + 0x168]
push edx
push ebp
call eax
add esp, 8
mov eax, dword [esp + 0x1c]
xor ecx, ecx
shld ecx, eax, 3
shl eax, 3
bswap eax
xor dword [esi + 0x4c], eax
lea eax, [esi + 0x60]
push eax
mov eax, dword [esi + 0x168]
bswap ecx
xor dword [esi + 0x48], ecx
push ebp
call eax
mov edi, dword [esi + 0x4c]
add esp, 8
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov dword [esi], eax
mov dword [esi + 4], ecx
mov eax, dword [esi + 0x48]
mov ecx, dword [esi + 0x4c]
mov dword [esi + 8], eax
bswap edi
mov dword [esi + 0xc], ecx
mov dword [ebp], 0
lea eax, [esi + 0x20]
mov dword [ebp + 4], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
push dword [esi + 0x178]
push eax
mov eax, dword [esi + 0x174]
push esi
call eax
add esp, 0xc
inc edi
bswap edi
mov dword [esi + 0xc], edi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4c61c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xc
call fcn.005f62e0
lea eax, [esp]
push eax
call fcn.004c5d90
mov eax, dword [esp + 8]
add esp, 4
test eax, eax
je 0x4c61e3
add esp, 0xc
jmp eax
push ebx
mov ebx, dword [esp + 0x20]
push esi
xor esi, esi
test ebx, ebx
je 0x4c6222
push ebp
mov ebp, dword [esp + 0x24]
push edi
mov edi, dword [esp + 0x20]
nop dword [eax]
movups xmm1, xmmword [esi + ebp]
movups xmm0, xmmword [edi]
push dword [esp + 0x24]
xorps xmm0, xmm1
push edi
movups xmmword [edi], xmm0
call dword [esp + 0x20]
add esi, 0x10
add esp, 8
cmp esi, ebx
jb 0x4c6200
pop edi
pop ebp
pop esi
pop ebx
add esp, 0xc
ret
Function at 0x4c6560
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x30
call fcn.005f62e0
mov eax, dword [0x6c02d0]
xor eax, esp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
push ebx
push ebp
mov ebp, dword [esp + 0x40]
push esi
mov esi, dword [esp + 0x40]
mov dword [esp + 0x1c], eax
push edi
mov edi, dword [esp + 0x50]
mov al, byte [esi]
mov ebx, dword [esi + 0x28]
mov ecx, dword [esi + 0x2c]
mov byte [esp + 0x13], al
lea eax, [esi + 0x10]
test byte [esp + 0x13], 0x40
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ecx
jne 0x4c65bf
push ecx
push eax
push esi
call ebx
mov edx, dword [esp + 0x20]
add esp, 0xc
movzx eax, byte [esp + 0x13]
mov ebx, 0xf
and eax, 7
xor ecx, ecx
sub ebx, eax
mov byte [esi], al
mov dword [esp + 0x28], ebx
cmp ebx, 0xf
jae 0x4c65f3
nop dword [eax + eax]
movzx eax, byte [esi + ebx]
or ecx, eax
mov byte [esi + ebx], 0
inc ebx
shl ecx, 8
cmp ebx, 0xf
jb 0x4c65e0
movzx eax, byte [esi + 0xf]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edi
je 0x4c6617
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.005f5e48
add esp, 0x30
ret
mov ebx, edi
shr ebx, 4
test ebx, ebx
je 0x4c6653
lea eax, [esi + 0x10]
push eax
push esi
push dword [esp + 0x20]
push ebx
push edx
push ebp
call dword [esp + 0x38]
shl ebx, 4
add esp, 0x18
add dword [esp + 0x14], ebx
add ebp, ebx
sub edi, ebx
je 0x4c66ad
shr ebx, 4
push ebx
push esi
call fcn.004c6f80
mov ebx, dword [esp + 0x1c]
add esp, 8
jmp 0x4c665d
mov ebx, dword [esp + 0x14]
mov eax, edi
test eax, eax
je 0x4c66ad
push dword [esp + 0x18]
lea eax, [esp + 0x30]
push eax
push esi
call dword [esp + 0x28]
add esp, 0xc
test edi, edi
je 0x4c6698
lea ecx, [esp + 0x2c]
mov eax, ecx
lea edx, [esi + 0x10]
sub ebp, eax
sub ebx, eax
nop
mov al, byte [ecx + ebp]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
lea edx, [edx + 1]
mov byte [ebx + ecx - 1], al
xor byte [edx - 1], al
sub edi, 1
jne 0x4c6680
mov ebp, dword [esp + 0x18]
lea ebx, [esi + 0x10]
mov edi, dword [esp + 0x1c]
push ebp
push ebx
push ebx
call edi
add esp, 0xc
jmp 0x4c66b8
mov edi, dword [esp + 0x1c]
lea ebx, [esi + 0x10]
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
cmp ecx, 0x10
jae 0x4c66d7
mov eax, 0x10
sub eax, ecx
push eax
lea eax, [ecx + esi]
push 0
push eax
call fcn.005f77b0
add esp, 0xc
push ebp
lea eax, [esp + 0x30]
push eax
push esi
call edi
mov eax, dword [esp + 0x38]
add esp, 0xc
xor dword [ebx], eax
mov eax, dword [esp + 0x30]
xor dword [ebx + 4], eax
mov eax, dword [esp + 0x34]
xor dword [esi + 0x18], eax
mov eax, dword [esp + 0x38]
xor dword [esi + 0x1c], eax
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x3c]
pop edi
mov byte [esi], al
xor eax, eax
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005f5e48
add esp, 0x30
ret
Function at 0x4c8540
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10
call fcn.005f62e0
mov edx, dword [esp + 0x1c]
xor ecx, ecx
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x28]
test edx, edx
je 0x4c8697
push ebx
push ebp
mov ebp, dword [esp + 0x28]
cmp edx, 8
jb 0x4c867a
lea eax, [ebp - 1]
lea ebx, [edi - 1]
add eax, edx
add ebx, edx
cmp edi, eax
ja 0x4c8587
cmp ebx, ebp
jae 0x4c867a
lea eax, [edx - 1]
add eax, esi
cmp edi, eax
ja 0x4c8598
cmp ebx, esi
jae 0x4c867a
cmp edx, 0x40
jb 0x4c863c
mov ebx, edx
mov eax, edx
and ebx, 0x3f
mov edx, esi
sub eax, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
mov ebx, esi
lea eax, [edi + 0x20]
sub ebx, ebp
mov dword [esp + 0x10], eax
mov ebp, edi
mov eax, dword [esp + 0x28]
sub ebp, eax
sub edx, edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x14], edx
lea edx, [eax + 0x10]
movups xmm0, xmmword [edx - 0x10]
mov eax, dword [esp + 0x14]
lea edx, [edx + 0x40]
movups xmm1, xmmword [ecx + esi]
lea edi, [edi + 0x40]
xorps xmm1, xmm0
movups xmmword [edi - 0x60], xmm1
movups xmm0, xmmword [edx - 0x40]
movups xmm1, xmmword [ebx + edx - 0x40]
xorps xmm1, xmm0
movups xmmword [edx + ebp - 0x40], xmm1
movups xmm1, xmmword [eax + edi - 0x40]
mov eax, dword [esp + 0x28]
movups xmm0, xmmword [edx - 0x30]
xorps xmm1, xmm0
movups xmmword [edi - 0x40], xmm1
movups xmm1, xmmword [ecx + esi + 0x30]
add ecx, 0x40
movups xmm0, xmmword [edx - 0x20]
xorps xmm1, xmm0
movups xmmword [edi - 0x30], xmm1
cmp ecx, dword [esp + 0x18]
jb 0x4c85d4
cmp dword [esp + 0x1c], 8
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
jb 0x4c8672
jmp 0x4c8648
mov eax, dword [esp + 0x28]
mov ebx, esi
sub ebx, ebp
mov ebp, edi
sub ebp, eax
mov dword [esp + 0x2c], edx
and dword [esp + 0x2c], 0xfffffff8
add eax, ecx
movq xmm1, qword [eax + ebx]
lea eax, [eax + 8]
movq xmm0, qword [eax - 8]
add ecx, 8
xorps xmm1, xmm0
movq qword [eax + ebp - 8], xmm1
cmp ecx, dword [esp + 0x2c]
jb 0x4c8653
cmp ecx, edx
jae 0x4c8695
mov ebp, dword [esp + 0x28]
sub esi, ebp
lea eax, [ecx + ebp]
sub edi, ebp
sub edx, ecx
mov cl, byte [esi + eax]
lea eax, [eax + 1]
xor cl, byte [eax - 1]
mov byte [edi + eax - 1], cl
sub edx, 1
jne 0x4c8683
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x10
ret
Function at 0x4c87b0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 8
call fcn.005f62e0
mov ecx, dword [esp + 0xc]
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
lea ebp, [ecx + 0x40]
mov esi, dword [ecx + 0x14]
cmp edi, esi
jbe 0x4c885a
mov edx, dword [ecx + 0x18]
cmp edi, edx
jb 0x4c880d
mov eax, edi
sub eax, edx
add eax, 4
and eax, 0xfffffffc
add eax, edx
push 0x71
mov dword [ecx + 0x18], eax
push str.cryptomodesocb128.c
shl eax, 4
push eax
push dword [ebp]
call fcn.004c09f0
add esp, 0x10
test eax, eax
jne 0x4c880a
pop edi
pop esi
pop ebp
add esp, 8
ret
mov dword [ebp], eax
mov eax, esi
shl eax, 4
mov dword [esp + 0x10], eax
mov eax, edi
mov edi, dword [esp + 0x10]
sub eax, esi
mov dword [esp + 0xc], eax
push ebx
mov eax, dword [ebp]
add eax, edi
mov bl, byte [eax]
lea esi, [eax + 0x10]
push esi
shr bl, 7
push 1
neg bl
push eax
and bl, 0x87
call fcn.004c84b0
xor byte [esi + 0xf], bl
add esp, 0xc
add edi, 0x10
sub dword [esp + 0x10], 1
jne 0x4c8823
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
pop ebx
mov dword [eax + 0x14], edi
shl edi, 4
add edi, dword [ebp]
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 8
ret
Function at 0x4ced30
Capabilities:
Allocate thread local storage

Disassembly:
cmp dword [0x6c15f8], 2
push esi
push edi
mov edi, 1
je 0x4ced87
mov edx, 0x6c15f8
mov ecx, edi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x4ced61
cmp eax, 1
je 0x4ced45
cmp dword [0x6c15f8], 2
jne 0x4ceda1
jmp 0x4ced87
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push 0x4cec80
push 0
push 0
mov dword [0x6c15f4], eax
call fcn.004d06e0
add esp, 0xc
mov dword [0x6c15f8], 2
push 0x97
push str.crypto_threads_win.c
push 0x34
call fcn.004c0bd0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4ceda6
pop edi
xor eax, eax
pop esi
ret
push ebx
push ebp
call fcn.004fb3d0
mov dword [esi + 0x20], eax
call fcn.004fb110
mov dword [esi + 0x28], eax
call fcn.004fb110
mov dword [esi + 0x30], eax
lea ebp, [esi + 0x24]
call fcn.004fb3d0
mov dword [ebp], eax
lea ebx, [esi + 0x2c]
call fcn.004fb3d0
cmp dword [esp + 0x14], edi
push 0x85
cmovge edi, dword [esp + 0x18]
inc edi
mov dword [ebx], eax
push str.crypto_threads_win.c
lea eax, [edi*8]
push eax
call fcn.004c0bd0
add esp, 0xc
mov dword [esi + 0xc], edi
mov dword [esi + 8], eax
lea edi, [esi + 0x20]
test eax, eax
je 0x4cee22
cmp dword [esi + 0x28], 0
je 0x4cee22
cmp dword [esi + 0x30], 0
je 0x4cee22
cmp dword [edi], 0
je 0x4cee22
cmp dword [ebp], 0
je 0x4cee22
cmp dword [ebx], 0
jne 0x4cee6b
push 0xa8
push str.crypto_threads_win.c
push eax
call fcn.004c09d0
lea eax, [esi + 0x28]
push eax
call fcn.004fb0b0
lea eax, [esi + 0x30]
push eax
call fcn.004fb0b0
push ebp
call fcn.004fb390
push ebx
call fcn.004fb390
push edi
call fcn.004fb390
push 0xae
push str.crypto_threads_win.c
push esi
call fcn.004c09d0
add esp, 0x2c
xor esi, esi
pop ebp
pop ebx
pop edi
mov eax, esi
pop esi
ret
Function at 0x4cee80
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, 0x10
call fcn.005f62e0
push ebx
push ebp
or ebp, 0xffffffff
push esi
mov dword [esp + 0x10], ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x6c15f4]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push esi
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
jne 0x4ceefb
push 0xdd
push str.crypto_threads_win.c
push 0x78
call fcn.004c0bd0
mov ebx, eax
add esp, 0xc
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x4ceeee
push 0xde
push str.crypto_threads_win.c
push str.assertion_failed:_data___NULL
call fcn.004c8870
add esp, 0xc
push ebx
push dword [0x6c15f4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edx, dword [esp + 0x20]
xor ecx, ecx
mov eax, ebx
cmp dword [eax], 0
jne 0x4cef12
cmp ebp, 0xffffffff
cmove ebp, ecx
mov dword [esp + 0x10], ebp
cmp dword [eax + 8], edx
je 0x4cefe1
inc ecx
add eax, 0xc
cmp ecx, 0xa
jl 0x4cef03
lea ebx, [edx + 0x14]
mov dword [esp + 0xc], ebx
push edi
nop dword [eax]
xor esi, esi
mov eax, dword [ebx]
mov ecx, eax
or ecx, esi
lock cmpxchg dword [ebx], ecx
jne 0x4cef34
mov ebp, dword [edx + 8]
mov dword [esp + 0x1c], eax
shl eax, 3
add ebp, eax
nop word [eax + eax]
mov esi, dword [ebp]
mov ebx, esi
mov edi, dword [ebp + 4]
add ebx, 1
mov ecx, edi
mov eax, esi
adc ecx, 0
mov edx, edi
lock cmpxchg8b qword [ebp]
cmp eax, esi
jne 0x4cef50
cmp edx, edi
jne 0x4cef50
mov edx, dword [esp + 0x10]
xor esi, esi
mov eax, dword [edx]
mov ecx, eax
or ecx, esi
lock cmpxchg dword [edx], ecx
jne 0x4cef79
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x1c]
mov edx, dword [esi + 8]
cmp edi, eax
je 0x4cefc3
lea ebp, [edx + edi*8]
mov edi, dword [ebp]
mov ebx, edi
mov esi, dword [ebp + 4]
sub ebx, 1
mov ecx, esi
mov eax, edi
sbb ecx, 0
mov edx, esi
lock cmpxchg8b qword [ebp]
cmp eax, edi
jne 0x4cef95
cmp edx, esi
jne 0x4cef95
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x10]
jmp 0x4cef30
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*4]
lea eax, [edx + edi*8]
mov dword [ecx + 4], 1
mov dword [ecx], eax
mov dword [ecx + 8], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x4cf000
Capabilities:
Get thread local storage value

Disassembly:
mov eax, 8
call fcn.005f62e0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x6c15f4]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [esp + 0x14]
lea edx, [edi + 8]
xor ecx, ecx
cmp dword [edx], esi
je 0x4cf045
inc ecx
add edx, 0xc
cmp ecx, 0xa
jl 0x4cf032
pop edi
pop esi
add esp, 8
ret
lea eax, [ecx + ecx*2]
add dword [edi + eax*4 + 4], 0xffffffff
push ebx
lea ebx, [edi + eax*4]
jne 0x4cf0c4
mov eax, dword [ebx]
mov dword [esp + 0xc], eax
push ebp
nop word [eax + eax]
mov esi, dword [eax]
mov ebp, esi
mov edi, dword [eax + 4]
sub ebp, 1
mov ecx, edi
mov dword [esp + 0x14], edi
mov edx, edi
sbb ecx, 0
mov edi, dword [esp + 0x10]
mov eax, esi
push ebx
mov ebx, ebp
lock cmpxchg8b qword [edi]
mov ebp, ebx
pop ebx
mov edi, dword [esp + 0x14]
cmp eax, esi
mov eax, dword [esp + 0x10]
jne 0x4cf060
cmp edx, edi
jne 0x4cf060
test ecx, ecx
jg 0x4cf0b6
jl 0x4cf09f
test ebp, ebp
jae 0x4cf0b6
push 0x10b
push str.crypto_threads_win.c
push str.assertion_failed:_ret___0
call fcn.004c8870
add esp, 0xc
mov dword [ebx], 0
mov dword [ebx + 8], 0
pop ebp
pop ebx
pop edi
pop esi
add esp, 8
ret

Function at 0x4dcaa0
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov eax, 4
call fcn.005f62e0
push edi
mov edi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
test edi, edi
je 0x4dcb20
mov cl, byte [edi]
test cl, cl
je 0x4dcb20
push ebx
push esi
mov ebx, 0x100
nop word [eax + eax]
movd xmm1, dword [esp + 0xc]
lea edi, [edi + 1]
movsx esi, cl
mov edx, 0x20
or esi, ebx
add ebx, 0x100
mov ecx, esi
shr ecx, 2
xor ecx, esi
imul esi, esi
and ecx, 0xf
sub edx, ecx
shl eax, cl
mov cl, byte [edi]
movd xmm0, edx
psrlq xmm1, xmm0
movd edx, xmm1
or eax, edx
xor eax, esi
mov dword [esp + 0xc], eax
test cl, cl
jne 0x4dcad0
pop esi
mov ecx, eax
pop ebx
shr ecx, 0x10
xor eax, ecx
pop edi
pop ecx
ret
xor eax, eax
pop edi
pop ecx
ret

Function at 0x4dcbd0
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov eax, 4
call fcn.005f62e0
push edi
mov edi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
test edi, edi
je 0x4dcc53
mov cl, byte [edi]
test cl, cl
je 0x4dcc53
push ebx
push esi
mov ebx, 0x100
nop word [eax + eax]
movd xmm1, dword [esp + 0xc]
lea edi, [edi + 1]
movsx esi, cl
mov edx, 0x20
and esi, 0xffffffdf
or esi, ebx
add ebx, 0x100
mov ecx, esi
shr ecx, 2
xor ecx, esi
imul esi, esi
and ecx, 0xf
sub edx, ecx
shl eax, cl
mov cl, byte [edi]
movd xmm0, edx
psrlq xmm1, xmm0
movd edx, xmm1
or eax, edx
xor eax, esi
mov dword [esp + 0xc], eax
test cl, cl
jne 0x4dcc00
pop esi
mov ecx, eax
pop ebx
shr ecx, 0x10
xor eax, ecx
pop edi
pop ecx
ret
xor eax, eax
pop edi
pop ecx
ret
Function at 0x4de730
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
push esi
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
lea edx, [eax - 1]
not eax
shr edx, 0x1f
shr eax, 0x1f
and edx, eax
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 4]
dec edx
xor eax, ecx
mov dword [esp + 0x10], edx
and eax, edx
xor ecx, eax
mov dword [ebp + 4], ecx
xor dword [ebx + 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebx + 0xc]
xor eax, ecx
movd xmm0, edx
and eax, edx
pshufd xmm4, xmm0, 0
xor ecx, eax
mov dword [ebp + 0xc], ecx
xor dword [ebx + 0xc], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x10]
xor eax, ecx
and eax, edx
and eax, 4
xor ecx, eax
mov dword [ebp + 0x10], ecx
xor dword [ebx + 0x10], eax
xor eax, eax
mov esi, dword [esp + 0x1c]
test esi, esi
jle 0x4de846
push edi
cmp esi, 4
jb 0x4de821
mov ecx, dword [ebp]
lea edi, [esi - 1]
mov edx, dword [ebx]
lea ebp, [esi - 1]
lea ebp, [ecx + ebp*4]
cmp edx, ebp
lea edi, [edx + edi*4]
mov ebp, dword [esp + 0x18]
ja 0x4de7c4
cmp edi, ecx
jae 0x4de821
cmp edx, ebx
ja 0x4de7cc
cmp edi, ebx
jae 0x4de821
cmp edx, ebp
ja 0x4de7d4
cmp edi, ebp
jae 0x4de821
lea edi, [esi - 1]
lea edi, [ecx + edi*4]
cmp ecx, ebx
ja 0x4de7e2
cmp edi, ebx
jae 0x4de821
cmp ecx, ebp
ja 0x4de7ea
cmp edi, ebp
jae 0x4de821
mov edi, esi
and edi, 0xfffffffc
nop
movups xmm3, xmmword [edx + eax*4]
movups xmm2, xmmword [ecx + eax*4]
movaps xmm1, xmm3
xorps xmm1, xmm2
andps xmm1, xmm4
movaps xmm0, xmm1
xorps xmm1, xmm3
xorps xmm0, xmm2
movups xmmword [ecx + eax*4], xmm0
movups xmmword [edx + eax*4], xmm1
add eax, 4
cmp eax, edi
jl 0x4de7f0
mov dword [esp + 0x18], eax
cmp eax, esi
jge 0x4de845
mov ecx, dword [ebp]
mov edx, dword [ecx + eax*4]
lea esi, [ecx + eax*4]
mov ecx, dword [ebx]
mov edi, dword [ecx + eax*4]
xor edi, edx
and edi, dword [esp + 0x14]
xor edx, edi
mov dword [esi], edx
mov ecx, dword [ebx]
xor dword [ecx + eax*4], edi
inc eax
cmp eax, dword [esp + 0x20]
jl 0x4de821
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4deee0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 8
call fcn.005f62e0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
push ebx
push ebp
test byte [eax + 0x10], 4
mov ebx, dword [eax]
mov ebp, dword [ecx]
push esi
je 0x4defa1
mov edx, dword [ecx + 4]
cmp dword [eax + 4], edx
jne 0x4defa1
push edi
xor edi, edi
mov dword [esp + 0x1c], edi
test edx, edx
jle 0x4def97
sub ebx, ebp
nop dword [eax]
mov edx, dword [ebx + ebp]
lea ebp, [ebp + 4]
mov ecx, dword [ebp - 4]
mov esi, edx
sub esi, ecx
mov eax, edx
xor esi, ecx
xor eax, ecx
or esi, eax
xor esi, edx
shr esi, 0x1f
neg esi
mov dword [esp + 0x14], esi
not esi
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x10]
and eax, edi
mov edi, dword [esp + 0x14]
mov edx, dword [ebp - 4]
or edi, eax
mov ecx, dword [ebx + ebp - 4]
mov esi, edx
sub esi, ecx
mov eax, edx
xor esi, ecx
xor eax, ecx
or esi, eax
mov eax, dword [esp + 0x20]
xor esi, edx
shr esi, 0x1f
neg esi
mov dword [esp + 0x10], esi
not esi
mov dword [esp + 0x14], esi
mov ecx, dword [esp + 0x14]
and ecx, edi
mov edi, dword [esp + 0x10]
and edi, 1
or edi, ecx
mov ecx, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, dword [eax + 4]
jl 0x4def20
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov edx, dword [eax + 4]
mov eax, edx
sub eax, dword [ecx + 4]
jne 0x4defd3
lea ecx, [edx - 1]
test ecx, ecx
js 0x4defd1
lea eax, [ecx*4]
add eax, ebp
sub ebx, ebp
nop dword [eax]
mov edx, dword [eax + ebx]
mov esi, dword [eax]
cmp esi, edx
jne 0x4defda
sub eax, 4
sub ecx, 1
jns 0x4defc0
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 8
ret
sbb eax, eax
pop esi
and eax, 2
pop ebp
dec eax
pop ebx
add esp, 8
ret