joyce8/EMBER2024-capa huggingface dataset:
Function at 0x423660
Capabilities:
Contain obfuscated stackstrings
Encrypt data using salsa20 or chacha

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc4
mov dword [esp + 0xc], 0x6b206574
mov dword [esp + 8], 0x79622d32
mov dword [esp + 4], 0x3320646e
mov dword [esp], 0x61707865
mov dword [esp + 0x10], 0x20975973
mov dword [esp + 0x14], 0xcc32a780
mov dword [esp + 0x18], 0x9da34bcf
mov dword [esp + 0x1c], 0xc54422bb
mov dword [esp + 0x20], 0x13287d75
mov dword [esp + 0x24], 0xdf36d695
mov dword [esp + 0x28], 0xeb826f76
mov dword [esp + 0x2c], 0x1bdc0a6f
mov esi, dword [esp + 0xd8]
mov ebx, edx
mov edi, ecx
movzx eax, byte [section..data]
cmp al, 0xff
jne 0x423731
lea ecx, [esp + 0xb4]
mov ebp, ebx
call fcn.00514720
lea ecx, [esp + 0x30]
call fcn.00514740
mov ebx, dword [esp + 0xbc]
mov eax, ebx
not eax
test eax, 0xc000000
jne 0x423716
call fcn.0040cfa0
not eax
test al, 6
sete al
jmp 0x423718
xor eax, eax
mov ecx, dword [esp + 0x34]
shr ebx, 0x1c
and bl, al
and ecx, 0x20
shr ecx, 5
and bl, cl
mov byte [section..data], bl
mov ebx, ebp
movsd xmm1, qword [esp + 8]
movsd xmm2, qword [esp + 0x10]
movsd xmm0, qword [esp]
test esi, esi
movsd qword [esp + 0x38], xmm1
movsd xmm1, qword [esp + 0x18]
movsd qword [esp + 0x40], xmm2
movsd xmm2, qword [esp + 0x20]
movsd qword [esp + 0x30], xmm0
movsd qword [esp + 0x48], xmm1
movsd xmm1, qword [esp + 0x28]
movsd qword [esp + 0x50], xmm2
movsd qword [esp + 0x58], xmm1
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0x46dcfb08
mov dword [esp + 0x68], 0x1c243272
mov dword [esp + 0x6c], 0x17a9cef3
mov byte [esp + 0xb0], 0
je 0x423882
js 0x42391a
mov eax, dword [0x5a1188]
test eax, eax
jne 0x423866
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x423876
mov dword [0x5a1188], eax
push esi
push 8
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ebp, eax
test eax, eax
jne 0x423887
mov ecx, 1
mov edx, esi
call fcn.00531970
mov ebp, 1
mov dword [esp], ebx
mov ebx, esp
lea ecx, [esp + 0x30]
mov dword [esp + 4], ebp
mov dword [esp + 8], esi
mov edx, ebx
call fcn.00401310
test al, al
jne 0x4238cb
mov ebx, esp
mov edx, ebp
mov ecx, ebx
push esi
call fcn.004586f0
add esp, 4
cmp dword [esp], 0
jne 0x4238e5
mov dword [edi], esi
mov dword [edi + 4], ebp
mov dword [edi + 8], esi
add esp, 0xc4
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
push 0x53a824
push 0x539f00
push ebx
call fcn.00533020
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], esi
mov edx, 0x2b
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov ecx, str.called__Result::unwrap____on_an__Err__value
push 0x53a834
push 0x539ee0
push ebx
call fcn.00533020
call fcn.004478d0
int3
Function at 0x45a7c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, edx
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
xor esi, esi
lea edx, [eax + edx*2]
movzx ebx, byte [eax + 1]
cmp byte [eax], ch
lea eax, [eax + 2]
lea edi, [esi + ebx]
jne 0x45a810
cmp esi, edi
ja 0x45a878
cmp edi, dword [esp + 0x1c]
ja 0x45a886
add esi, dword [esp + 0x18]
nop word [eax + eax]
test ebx, ebx
je 0x45a812
dec ebx
cmp byte [esi], cl
lea esi, [esi + 1]
jne 0x45a800
jmp 0x45a86f
ja 0x45a818
cmp eax, edx
mov esi, edi
jne 0x45a7d3
mov edi, dword [esp + 0x24]
movzx ecx, cx
mov al, 1
add edi, ebp
nop word cs:[eax + eax]
nop dword [eax]
movzx edx, byte [ebp]
lea esi, [ebp + 1]
test dl, dl
js 0x45a850
mov ebp, esi
sub ecx, edx
jns 0x45a867
jmp 0x45a871
cmp esi, edi
je 0x45a896
movzx esi, byte [ebp + 1]
and edx, 0x7f
add ebp, 2
shl edx, 8
or edx, esi
sub ecx, edx
js 0x45a871
xor al, 1
cmp ebp, edi
jne 0x45a830
jmp 0x45a871
xor eax, eax
and al, 1
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
mov edx, edi
push 0x53f418
call fcn.00532f20
mov edx, dword [esp + 0x1c]
mov ecx, edi
push 0x53f418
call fcn.00532d00
mov ecx, 0x59e39c
mov edx, 0x2b
push 0x53f408
call fcn.00532d60
int3
Function at 0x45ecd0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
cmp eax, 0x80
jb 0x45eea3
movdqu xmm4, xmmword [edx]
not ecx
movdqu xmm3, xmmword [edx + 0x10]
movdqu xmm2, xmmword [edx + 0x20]
movdqu xmm1, xmmword [edx + 0x30]
movdqa xmm5, xmmword [0x539570]
add edx, 0x40
add eax, 0xffffffc0
movd xmm0, ecx
pxor xmm0, xmm4
movdqa xmm4, xmmword [0x539560]
nop word cs:[eax + eax]
nop dword [eax]
movdqa xmm6, xmm0
movdqa xmm7, xmm0
movdqu xmm0, xmmword [edx]
add eax, 0xffffffc0
pclmulqdq xmm6, xmm4, 0
pclmulqdq xmm7, xmm5, 0x11
pxor xmm0, xmm6
movdqu xmm6, xmmword [edx + 0x10]
pxor xmm0, xmm7
movdqa xmm7, xmm3
pclmulqdq xmm3, xmm5, 0x11
pclmulqdq xmm7, xmm4, 0
pxor xmm7, xmm6
movdqu xmm6, xmmword [edx + 0x20]
pxor xmm3, xmm7
movdqa xmm7, xmm2
pclmulqdq xmm2, xmm5, 0x11
pclmulqdq xmm7, xmm4, 0
pxor xmm7, xmm6
movdqu xmm6, xmmword [edx + 0x30]
add edx, 0x40
cmp eax, 0x3f
pxor xmm2, xmm7
movdqa xmm7, xmm1
pclmulqdq xmm1, xmm5, 0x11
pclmulqdq xmm7, xmm4, 0
pxor xmm7, xmm6
pxor xmm1, xmm7
ja 0x45ed20
movdqa xmm4, xmmword [0x539580]
movdqa xmm5, xmmword [0x539590]
movdqa xmm6, xmm0
cmp eax, 0x10
pclmulqdq xmm6, xmm4, 0
pclmulqdq xmm0, xmm5, 0x11
pxor xmm0, xmm6
pxor xmm0, xmm3
movdqa xmm3, xmm0
pclmulqdq xmm0, xmm5, 0x11
pclmulqdq xmm3, xmm4, 0
pxor xmm0, xmm3
pxor xmm0, xmm2
movdqa xmm2, xmm0
pclmulqdq xmm0, xmm5, 0x11
pclmulqdq xmm2, xmm4, 0
pxor xmm0, xmm2
pxor xmm0, xmm1
jb 0x45ee37
nop word cs:[eax + eax]
nop dword [eax]
movdqu xmm1, xmmword [edx]
movdqa xmm2, xmm0
add eax, 0xfffffff0
pclmulqdq xmm0, xmm5, 0x11
add edx, 0x10
pclmulqdq xmm2, xmm4, 0
cmp eax, 0xf
pxor xmm2, xmm1
pxor xmm0, xmm2
ja 0x45ee10
movdqa xmm1, xmmword [0x539590]
pxor xmm2, xmm2
test eax, eax
pclmulqdq xmm1, xmm0, 1
psrldq xmm0, 8
pxor xmm0, xmm1
pxor xmm1, xmm1
pblendw xmm2, xmm0, 3
psrldq xmm0, 4
pclmulqdq xmm2, xmmword [0x5395a0], 0
pxor xmm0, xmm2
pxor xmm2, xmm2
pblendw xmm2, xmm0, 3
pclmulqdq xmm2, xmmword [0x5395b0], 0x10
pblendw xmm2, xmm1, 0xfc
pclmulqdq xmm2, xmmword [0x5395c0], 0
pxor xmm2, xmm0
pextrd ecx, xmm2, 1
not ecx
je 0x45eead
push eax
call fcn.0045e940
add esp, 4
ret
mov eax, ecx
ret
Function at 0x45f810
Capabilities:
Get hostname

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov ebx, ecx
mov esi, esp
mov dword [esp], 0
push esi
push 0
push 5
call sub.kernel32.dll_GetComputerNameExW
mov ebp, dword [esp]
test ebp, ebp
je 0x45f8bf
cmp ebp, 0x3fffffff
ja 0x45f8e6
mov edi, ebp
add edi, ebp
js 0x45f8e6
mov dword [esp + 4], ebx
mov eax, dword [0x5a1188]
test eax, eax
jne 0x45f86d
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x45f93f
mov dword [0x5a1188], eax
push edi
push 8
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test eax, eax
je 0x45f93f
mov ebx, eax
push esi
push eax
push 5
call sub.kernel32.dll_GetComputerNameExW
test eax, eax
je 0x45f8eb
xor eax, eax
cmp word [ebx + eax*2], 0
je 0x45f89f
inc eax
add edi, 0xfffffffe
jne 0x45f890
mov eax, ebp
mov ecx, dword [esp + 4]
mov edx, ebx
push eax
call fcn.0051b390
add esp, 4
push ebx
push 0
push dword [0x5a1188]
call dword [sym.imp.kernel32.dll_HeapFree]
jmp 0x45f8de
push esi
push 2
push 5
call sub.kernel32.dll_GetComputerNameExW
test eax, eax
je 0x45f8eb
mov ecx, ebx
mov edx, 2
push 0
call fcn.0051b390
add esp, 4
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.004478d0
call fcn.005270d0
lea edx, [esp + 0x10]
lea ecx, [esp + 8]
mov dword [esp + 0x18], 0x54a278
mov dword [esp + 0x1c], 2
mov dword [esp + 0x28], 0
mov byte [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 8], edx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x18]
mov edx, 0x54a2e4
mov dword [esp + 0xc], fcn.0051e370
mov dword [esp + 0x24], 1
call fcn.00532c10
mov ecx, 2
mov edx, edi
call fcn.00531970
int3

Function at 0x45fa00
Capabilities:
Generate random numbers via rtlgenrandom
Generate random numbers via winapi

Disassembly:
push edi
push esi
mov esi, ecx
push 2
push 0x20
push ecx
push 0
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
mov edi, eax
xor eax, eax
cmp edi, 0xc0000000
jb 0x45fa35
push 0x20
push esi
call dword [sym.imp.advapi32.dll_SystemFunction036]
mov ecx, eax
add edi, 0x80000000
xor eax, eax
test cl, cl
cmove eax, edi
pop esi
pop edi
ret
Function at 0x462a20
Capabilities:
Get local ipv4 addresses
Get mac address on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, ecx
lea ebx, [esp + 8]
mov dword [esp + 8], 0
push ebx
push 0
push 0
push 0
push 0
call sub.iphlpapi.dll_GetAdaptersAddresses
mov edi, dword [esp + 8]
test edi, edi
je 0x462b33
cmp edi, 0x7ffffff9
jae 0x462b9c
movzx eax, byte [0x5a11e8]
mov eax, dword [0x5a1188]
test eax, eax
jne 0x462a7e
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x462b51
mov dword [0x5a1188], eax
push edi
push 0
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edi, eax
push ebx
push edi
push 0
push 0
push 0
call sub.iphlpapi.dll_GetAdaptersAddresses
mov ebp, dword [esp + 8]
test eax, eax
je 0x462aca
test edi, edi
je 0x462ac2
test ebp, ebp
je 0x462ac2
cmp ebp, 0x7ffffff9
jae 0x462bba
push edi
push 0
push dword [0x5a1188]
call dword [sym.imp.kernel32.dll_HeapFree]
mov byte [esi], 2
jmp 0x462b49
test edi, edi
je 0x462b33
mov eax, edi
movzx edx, byte [eax + 0x2d]
movzx ecx, byte [eax + 0x2c]
mov bh, byte [eax + 0x2e]
mov bl, byte [eax + 0x2f]
mov dh, byte [eax + 0x30]
mov byte [esp + 3], dl
mov dl, byte [eax + 0x31]
test cl, cl
mov byte [esp + 5], cl
jne 0x462b58
cmp byte [esp + 3], 0
jne 0x462b58
test bh, bh
jne 0x462b58
test bl, bl
jne 0x462b58
test dh, dh
jne 0x462b58
test dl, dl
jne 0x462b58
mov eax, dword [eax + 8]
test eax, eax
jne 0x462ad0
xor eax, eax
test edi, edi
je 0x462b35
test ebp, ebp
je 0x462b35
cmp ebp, 0x7ffffff9
jae 0x462bba
push edi
push 0
push dword [0x5a1188]
call dword [sym.imp.kernel32.dll_HeapFree]
xor eax, eax
mov byte [esi], al
mov byte [esi + 1], bl
mov byte [esi + 2], bh
mov byte [esi + 3], ch
mov byte [esi + 4], cl
mov byte [esi + 5], dh
mov byte [esi + 6], dl
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
xor edi, edi
jmp 0x462a8a
mov al, 1
test ebp, ebp
je 0x462b8e
cmp ebp, 0x7ffffff9
mov byte [esp + 6], dh
mov byte [esp + 7], dl
jae 0x462bba
push edi
push 0
push dword [0x5a1188]
call dword [sym.imp.kernel32.dll_HeapFree]
movzx edx, byte [esp + 7]
mov dh, byte [esp + 6]
mov ecx, ebx
mov ch, bh
mov al, 1
jmp 0x462b92
mov ecx, ebx
mov ch, bh
mov bh, byte [esp + 3]
mov bl, byte [esp + 5]
jmp 0x462b35
lea eax, [esp + 4]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
push 0x54a898
push 0x54a818
push eax
call fcn.00533020
lea eax, [esp + 4]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
push 0x54a888
push 0x54a818
push eax
call fcn.00533020
int3
Function at 0x4d8580
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ebx, dword [esp + 0x34]
mov dword [esp + 8], ecx
lea eax, [ebx - 1]
cmp eax, edx
jae 0x4d8710
cmp ebx, edx
jae 0x4d8708
mov ecx, dword [esp + 8]
mov eax, ebx
mov dword [esp + 0x10], edx
shl eax, 4
lea eax, [eax + ecx - 0x10]
mov dword [esp + 0xc], eax
jmp 0x4d85fc
add esi, 0xfffffff0
mov ebp, esi
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov ch, byte [esp + 3]
movzx edx, word [esp + 4]
mov cl, byte [esp + 6]
mov ebx, dword [esp + 0x14]
mov dword [ebp], eax
mov dword [ebp + 4], esi
mov dword [ebp + 8], edi
mov byte [ebp + 0xc], ch
mov word [ebp + 0xd], dx
mov edx, dword [esp + 0x10]
mov byte [ebp + 0xf], cl
add dword [esp + 0xc], 0x10
inc ebx
cmp ebx, edx
je 0x4d8708
mov ebp, dword [esp + 8]
mov esi, ebx
mov dword [esp + 0x14], ebx
shl esi, 4
mov edi, dword [ebp + esi + 8]
mov eax, dword [ebp + esi - 8]
mov ecx, dword [ebp + esi + 4]
mov ebx, edi
sub ebx, eax
cmovb eax, edi
push eax
push dword [ebp + esi - 0xc]
mov dword [esp + 0x20], ecx
push ecx
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
movzx ecx, byte [ebp + esi + 0xc]
test eax, eax
mov edx, dword [esp + 0x10]
cmovne ebx, eax
xor eax, eax
mov byte [esp + 3], cl
sub cl, byte [ebp + esi - 4]
cmp cl, 0xff
sete al
xor ecx, ecx
test ebx, ebx
mov ebx, dword [esp + 0x14]
sets cl
cmovne eax, ecx
cmp al, 1
jne 0x4d85ee
add esi, dword [esp + 8]
mov ebp, dword [esp + 0xc]
dec ebx
mov eax, dword [esi]
movzx edx, byte [esi + 0xf]
movzx ecx, word [esi + 0xd]
movsd xmm0, qword [esi - 0x10]
movsd xmm1, qword [esi - 8]
mov dword [esp + 0x1c], eax
mov byte [esp + 6], dl
mov word [esp + 4], cx
movsd qword [esi], xmm0
movsd qword [esi + 8], xmm1
je 0x4d85b9
nop word [eax + eax]
mov eax, dword [ebp - 8]
mov esi, edi
sub esi, eax
cmovb eax, edi
push eax
push dword [ebp - 0xc]
push dword [esp + 0x20]
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
movzx ecx, byte [esp + 3]
test eax, eax
cmovne esi, eax
xor eax, eax
sub cl, byte [ebp - 4]
cmp cl, 0xff
sete al
xor ecx, ecx
test esi, esi
sets cl
cmove ecx, eax
cmp cl, 1
jne 0x4d85be
lea eax, [ebp - 0x10]
dec ebx
movsd xmm0, qword [eax]
movsd xmm1, qword [eax + 8]
test ebx, ebx
movsd qword [ebp + 8], xmm1
movsd qword [ebp], xmm0
mov ebp, eax
jne 0x4d86a0
mov ebp, dword [esp + 8]
jmp 0x4d85be
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, str.assertion_failed:_offset___0__offset___len
mov edx, 0x2e
push 0x550688
call fcn.00532d60
int3
Function at 0x4e1d40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
sub esp, 0x18
mov eax, dword [0x5a1018]
test eax, eax
je 0x4e1d68
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jb 0x4e1d7e
cmp dword [eax + 4], 0
je 0x4e1d7e
add eax, 8
add esp, 0x18
pop esi
ret
mov ecx, 0x5a1018
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jae 0x4e1d5a
mov eax, dword [0x5a1018]
test eax, eax
je 0x4e1e1c
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
je 0x4e1e36
mov esi, eax
test eax, eax
jne 0x4e1df9
movzx eax, byte [0x5a11e8]
mov eax, dword [0x5a1188]
test eax, eax
jne 0x4e1dc5
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x4e1e7c
mov dword [0x5a1188], eax
push 0xc
push 0
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test eax, eax
je 0x4e1e7c
mov dword [eax], 0x5a1018
mov dword [eax + 4], 0
mov esi, eax
mov eax, dword [0x5a1018]
test eax, eax
je 0x4e1e3d
dec eax
push esi
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov ecx, 1
lock xadd dword [0x5a1014], ecx
test ecx, ecx
je 0x4e1e49
lea eax, [esi + 8]
mov dword [esi + 4], 1
mov dword [esi + 8], ecx
add esp, 0x18
pop esi
ret
mov ecx, 0x5a1018
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
jne 0x4e1d9c
xor eax, eax
add esp, 0x18
pop esi
ret
mov ecx, 0x5a1018
call fcn.005380e0
jmp 0x4e1df1
mov ecx, esp
mov edx, 0x5502bc
mov dword [esp], str.regex:_thread_ID_allocation_space_exhausted
mov dword [esp + 4], 1
mov dword [esp + 0x10], 0
mov dword [esp + 8], str.NoneSome_usr_local_cargo_registry_src_index.crates.io_6f17d22bba15001f_wmi_0.11.5_src_connection.rs
mov dword [esp + 0xc], 0
call fcn.00532c10
mov ecx, 4
mov edx, 0xc
call fcn.00531970
int3
Function at 0x516940
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x52e520
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
movzx eax, byte [0x5a118c]
test al, al
je 0x516b11
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x51698c
cmp eax, 3
jne 0x516b0a
mov ebx, dword [0x5a1190]
test ebx, ebx
je 0x516b0a
mov dword [ebp - 0x20], 0
jmp 0x5169b7
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x5169e8
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x516b5b
dec esi
push esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x5169b0
push 0
push esi
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x5169b0
test byte [ebp - 0x20], 1
je 0x516b0a
mov ebx, dword [0x5a1190]
test ebx, ebx
je 0x516b0a
mov dword [ebp - 0x20], 0
jmp 0x516a17
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x516a48
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x516b5b
dec esi
push esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x516a10
push 0
push esi
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x516a10
test byte [ebp - 0x20], 1
je 0x516b0a
mov ebx, dword [0x5a1190]
test ebx, ebx
je 0x516b0a
mov dword [ebp - 0x20], 0
jmp 0x516a77
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x516aa8
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x516b5b
dec esi
push esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x516a70
push 0
push esi
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x516a70
test byte [ebp - 0x20], 1
je 0x516b0a
mov ebx, dword [0x5a1190]
test ebx, ebx
je 0x516b0a
mov dword [ebp - 0x20], 0
jmp 0x516ad7
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x516b04
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x516b5b
dec esi
push esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x516ad0
push 0
push esi
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x516ad0
test byte [ebp - 0x20], 1
jne 0x516b24
movzx eax, byte [0x59e8e0]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
mov ebx, dword [0x5a1190]
jmp 0x516b2f
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x516b0a
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x516b5b
dec esi
push esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x516b2c
push 0
push esi
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push esi
call edi
add esp, 4
jmp 0x516b2c
mov dword [ebp - 0x10], 0
mov ecx, 0x59e39c
mov edx, 0x2b
push 0x59d770
call fcn.00532d60
add esp, 4
ud2
Function at 0x5179f0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
mov eax, dword [0x5a1070]
test eax, eax
je 0x517a18
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jb 0x517a2e
cmp dword [eax + 4], 0
mov edi, eax
je 0x517a2e
add edi, 8
mov eax, edi
pop esi
pop edi
ret
mov ecx, 0x5a1070
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jae 0x517a08
mov eax, dword [0x5a1070]
test eax, eax
je 0x517ae2
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
je 0x517afc
mov esi, eax
test eax, eax
jne 0x517aa9
movzx eax, byte [0x5a11e8]
mov eax, dword [0x5a1188]
test eax, eax
jne 0x517a75
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x517b0f
mov dword [0x5a1188], eax
push 0xc
push 0
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test eax, eax
je 0x517b0f
mov dword [eax], 0x5a1070
mov dword [eax + 4], 0
mov esi, eax
mov eax, dword [0x5a1070]
test eax, eax
je 0x517b03
dec eax
push esi
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov ecx, dword [esi + 8]
cmp dword [esi + 4], 0
lea edi, [esi + 8]
mov dword [esi + 4], 1
mov dword [esi + 8], 0
je 0x517a13
test ecx, ecx
je 0x517a13
lock dec dword [ecx]
jne 0x517a13
call fcn.00517560
mov eax, edi
pop esi
pop edi
ret
mov ecx, 0x5a1070
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
jne 0x517a4c
xor edi, edi
mov eax, edi
pop esi
pop edi
ret
mov ecx, 0x5a1070
call fcn.005380e0
jmp 0x517aa1
mov ecx, 4
mov edx, 0xc
call fcn.00531970
int3

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

Disassembly:
push esi
mov eax, dword [0x5a1080]
test eax, eax
je 0x518024
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jb 0x517fa3
cmp byte [eax + 4], 0
mov esi, eax
jne 0x51801d
mov eax, dword [0x5a1080]
test eax, eax
je 0x518043
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
je 0x51805d
mov esi, eax
test eax, eax
jne 0x518017
movzx eax, byte [0x5a11e8]
mov eax, dword [0x5a1188]
test eax, eax
jne 0x517fea
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x51806f
mov dword [0x5a1188], eax
push 8
push 0
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test eax, eax
je 0x51806f
mov dword [eax], 0x5a1080
mov byte [eax + 4], 0
mov esi, eax
mov eax, dword [0x5a1080]
test eax, eax
je 0x518063
dec eax
push esi
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov word [esi + 4], 1
add esi, 5
mov eax, esi
pop esi
ret
mov ecx, 0x5a1080
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jae 0x517f9b
jmp 0x517fa3
mov ecx, 0x5a1080
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
jne 0x517fc1
xor esi, esi
mov eax, esi
pop esi
ret
mov ecx, 0x5a1080
call fcn.005380e0
jmp 0x51800f
mov ecx, 4
mov edx, 8
call fcn.00531970
int3
Function at 0x518770
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
sub esp, 0x34
mov eax, dword [esp + 0x40]
mov esi, ecx
mov ecx, dword [esp + 0x44]
mov edi, edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x103
lea edx, [esp + 4]
push 0
push 0
push ecx
push eax
push edx
push 0
push 0
push 0
push edi
call dword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x5187c4
push 0xffffffffffffffff
push edi
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [esp + 4]
cmp eax, 0x103
je 0x5187e7
test eax, eax
js 0x5187d3
mov eax, dword [esp + 8]
mov dword [esi + 4], eax
mov al, 4
jmp 0x5187df
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov dword [esi + 4], eax
xor eax, eax
mov byte [esi], al
add esp, 0x34
pop esi
pop edi
ret
mov eax, esp
mov dword [esp + 0x1c], 0x59d1c4
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 0
mov dword [esp + 0xc], 0
mov byte [esp + 0x10], 0
lea ecx, [esp + 0xc]
lea edx, [esp + 0x14]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x28], 0
push eax
push ecx
push edx
call fcn.00517020
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
call fcn.00517180
mov ecx, 7
int 0x29
ud2
Function at 0x518e60
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
mov eax, dword [0x5a1060]
test eax, eax
je 0x518e82
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jb 0x518e98
cmp dword [eax + 4], 0
je 0x518e98
add eax, 8
pop esi
ret
mov ecx, 0x5a1060
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 2
jae 0x518e77
mov eax, dword [0x5a1060]
test eax, eax
je 0x518f1e
dec eax
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
je 0x518f38
mov esi, eax
test eax, eax
jne 0x518f07
movzx eax, byte [0x5a11e8]
mov eax, dword [0x5a1188]
test eax, eax
jne 0x518ed7
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x518f48
mov dword [0x5a1188], eax
push 0x10
push 0
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test eax, eax
je 0x518f48
mov dword [eax], 0x5a1060
mov dword [eax + 4], 0
mov esi, eax
mov eax, dword [0x5a1060]
test eax, eax
je 0x518f3c
dec eax
push esi
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [esi + 4], 1
mov dword [esi + 8], 0
lea eax, [esi + 8]
mov byte [esi + 0xc], 0
pop esi
ret
mov ecx, 0x5a1060
call fcn.005380e0
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
cmp eax, 1
jne 0x518eb2
xor eax, eax
pop esi
ret
mov ecx, 0x5a1060
call fcn.005380e0
jmp 0x518eff
mov ecx, 4
mov edx, 0x10
call fcn.00531970
int3