joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51dac3
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [ebp + 0x14], 0
mov ecx, eax
jle 0x51db01
cmp dword [ebp + 0x18], 0
jle 0x51db01
push dword [ebp + 0x18]
mov eax, dword [ecx + 0x90]
push dword [ebp + 0x14]
add eax, dword [ebp + 0x10]
push eax
mov eax, dword [ecx + 0x8c]
add eax, dword [ebp + 0xc]
push eax
push dword [ebp + 8]
push ecx
call dword [ecx + 0x28]
pop ebp
ret 0x14

Function at 0x51db05
Capabilities:
Get thread local storage value

Disassembly:
push edi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov ecx, dword [edi + 0x74]
cmp ecx, 2
je 0x51db2b
cmp ecx, 3
je 0x51db2b
cmp ecx, 8
je 0x51db2b
cmp ecx, 0xc
jne 0x51db55
mov eax, dword [edi + 0xbc]
test eax, eax
je 0x51db4e
push esi
mov esi, dword [eax]
push eax
push 0
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
test esi, esi
jne 0x51db36
pop esi
and dword [edi + 0xbc], 0
pop edi
ret

Function at 0x51db57
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [esp + 0x14]
mov esi, eax
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
add eax, dword [esi + 0x90]
add ebp, dword [esi + 0x8c]
mov dword [esp + 0x18], eax
test edi, edi
jns 0x51db8d
add ebp, edi
neg edi
mov ebx, dword [esp + 0x20]
test ebx, ebx
jns 0x51db9d
add eax, ebx
neg ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
add eax, eax
cmp eax, edi
jle 0x51dbb2
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x28]
add ecx, ecx
cmp ecx, ebx
jle 0x51dbc7
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xac]
je 0x51dbe0
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
push dword [esp + 0x28]
push dword [esp + 0x28]
push ebx
push edi
push dword [esp + 0x28]
push ebp
push esi
call dword [esi + 8]
pop edi
pop esi
pop ebp
pop ebx
ret 0x18
Function at 0x51dbfa
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [esp + 0x14]
mov edi, eax
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
add eax, dword [edi + 0x90]
add ebp, dword [edi + 0x8c]
mov dword [esp + 0x18], eax
test esi, esi
jns 0x51dc30
add ebp, esi
neg esi
mov ebx, dword [esp + 0x20]
test ebx, ebx
jns 0x51dc40
add eax, ebx
neg ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
add eax, eax
cmp eax, esi
jle 0x51dc55
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x28]
add ecx, ecx
cmp ecx, ebx
jle 0x51dc6a
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x2c]
cmp eax, dword [edi + 0xac]
je 0x51dc81
push eax
push edi
mov dword [edi + 0xac], eax
call dword [edi + 0x40]
push dword [esp + 0x28]
push dword [esp + 0x28]
push ebx
push esi
push dword [esp + 0x28]
push ebp
push edi
call dword [edi + 8]
pop edi
pop esi
pop ebp
pop ebx
ret 0x1c

Function at 0x51dc9b
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x51dcd2
push dword [ebp + 0x14]
mov ecx, dword [edx + 0x90]
add ecx, dword [ebp + 0x10]
push ecx
mov ecx, dword [edx + 0x8c]
add ecx, dword [ebp + 0xc]
push ecx
push dword [ebp + 8]
push edx
call eax
jmp 0x51dced
mov eax, dword [edx + 0x90]
add eax, dword [ebp + 0x10]
push eax
mov eax, dword [edx + 0x8c]
add eax, dword [ebp + 0xc]
push eax
push dword [ebp + 8]
push edx
call dword [edx + 0x24]
pop ebp
ret 0x10

Function at 0x51dcf1
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [ebp + 0x18]
cmp eax, dword [esi + 0xac]
je 0x51dd19
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
mov ecx, dword [esi + 0x90]
mov eax, dword [ebp + 0x14]
mov edx, dword [esi + 0x8c]
add eax, ecx
push eax
mov eax, dword [ebp + 0x10]
add eax, edx
push eax
mov eax, dword [ebp + 0xc]
add eax, ecx
push eax
mov eax, dword [ebp + 8]
add eax, edx
push eax
push esi
call dword [esi + 0x48]
pop esi
pop ebp
ret 0x14

Function at 0x51dd46
Capabilities:
Get thread local storage value

Disassembly:
push esi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [esp + 0x14]
cmp eax, dword [esi + 0xac]
je 0x51dd6c
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
push dword [esp + 0x10]
mov eax, dword [esi + 0x90]
add eax, dword [esp + 0x10]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [esp + 0x10]
push eax
push esi
call dword [esi + 0x3c]
pop esi
ret 0x10
Function at 0x51ddea
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [ebp + 0x14]
cmp eax, dword [esi + 0xac]
je 0x51de12
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
mov eax, dword [esi + 0x90]
mov ecx, dword [esi + 0xc]
add eax, dword [ebp + 0xc]
push dword [ebp + 0x10]
test ecx, ecx
je 0x51de35
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call ecx
jmp 0x51de47
push dword [ebp + 0x10]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call dword [esi + 0x38]
pop esi
pop ebp
ret 0x10

Function at 0x51de4c
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push edi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x14]
mov ebx, eax
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
add ecx, dword [ebx + 0x90]
add ebp, dword [ebx + 0x8c]
mov dword [esp + 0x14], ecx
test edi, edi
je 0x51dec2
push esi
mov esi, dword [esp + 0x20]
test esi, esi
je 0x51dec1
test edi, edi
jns 0x51de8d
inc edi
jmp 0x51de8e
dec edi
test esi, esi
jns 0x51de95
inc esi
jmp 0x51de96
dec esi
mov eax, dword [ebx + 0xa4]
cmp eax, dword [ebx + 0xac]
je 0x51deb3
push eax
push ebx
mov dword [ebx + 0xac], eax
call dword [ebx + 0x40]
mov ecx, dword [esp + 0x18]
lea eax, [ecx + esi]
push eax
lea eax, [edi + ebp]
push eax
push ecx
push ebp
push ebx
call dword [ebx + 0x48]
pop esi
pop edi
pop ebp
pop ebx
ret 0x10

Function at 0x51dec8
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xac]
je 0x51def3
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
mov eax, dword [esi + 0x90]
mov ecx, dword [esi + 0x34]
add eax, dword [ebp + 0xc]
test ecx, ecx
je 0x51df1d
fld dword [ebp + 0x14]
push ecx
fstp dword [esp]
push dword [ebp + 0x10]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call ecx
jmp 0x51df2f
push dword [ebp + 0x10]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call dword [esi + 0x30]
pop esi
pop ebp
ret 0x10
Function at 0x51df9d
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x184
push 8
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [esp + 8]
mov dword [0x6b3df0], esi
and dword [esi + 0xa8], 0
or dword [esi + 0xac], 0xffffffff
or dword [esi + 0xb0], 0xffffffff
push esi
mov dword [esi + 0xa4], 0xffffff
mov dword [esi + 0x74], 2
mov dword [esi + 0x78], 0x3f
call fcn.00521ebb
mov dword [esi + 0x58], 0x51ebb0
mov eax, esi
mov dword [esi + 0x5c], 0x51ebfc
mov dword [esi + 0x10], fcn.0051e751
mov dword [esi + 0x30], 0x51e643
mov dword [esi + 0x64], 0x51ec86
mov dword [esi + 0x60], 0x51ec3e
mov dword [esi + 0x34], 0x51e2f3
mov dword [esi + 0x24], 0x51e2ca
mov dword [esi + 0x28], 0x51e29f
mov dword [esi + 0x2c], 0x51e1f1
mov dword [esi + 0x44], 0x51e9b6
pop esi
ret 4

Function at 0x520005
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x10c
push 8
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0x6b3dec]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x6b3df0], esi
mov eax, esi
and dword [esi + 0xa8], 0
or dword [esi + 0xac], 0xffffffff
or dword [esi + 0xb0], 0xffffffff
mov dword [esi + 0xa4], 0xffffff
mov dword [esi + 0x74], 1
mov dword [esi + 0x78], 7
mov dword [esi], 0x51f0aa
mov dword [esi + 4], 0x51f0ca
mov dword [esi + 8], 0x51fe01
mov dword [esi + 0xc], 0x51f162
mov dword [esi + 0x10], 0x51f67f
mov dword [esi + 0x14], 0x51f611
mov dword [esi + 0x18], 0x51f64f
mov dword [esi + 0x1c], 0x51f667
mov dword [esi + 0x20], fcn.0051f6db
mov dword [esi + 0x24], 0x51f4e0
mov dword [esi + 0x28], fcn.0051f32e
mov dword [esi + 0x2c], 0x51f245
mov dword [esi + 0x30], 0x51f5a7
mov dword [esi + 0x34], 0x51f4fc
mov dword [esi + 0x38], 0x51f758
mov dword [esi + 0x3c], 0x51f869
mov dword [esi + 0x40], 0x51f90d
mov dword [esi + 0x44], 0x51f9a4
mov dword [esi + 0x48], 0x51faa2
mov dword [esi + 0x4c], 0x51fc83
mov dword [esi + 0x50], 0x51faf3
mov dword [esi + 0x54], 0x51fd45
mov dword [esi + 0x58], 0x51fe40
mov dword [esi + 0x5c], 0x51fefb
mov dword [esi + 0x60], 0x51ff73
mov dword [esi + 0x64], 0x51ffb9
pop esi
ret
Function at 0x525185
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov edx, dword [esp + 0x2c]
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xd4]
mov dword [esp + 4], eax
test edx, edx
je 0x52523b
imul eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
imul ecx, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
neg eax
add ecx, dword [esp + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28]
push ebp
push edi
lea edi, [ecx + eax*4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0xcc]
mov ebp, edi
imul ecx, ebx
add ecx, dword [esi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x52521b
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 4]
xor byte [ecx], al
add ecx, esi
dec edx
jne 0x5251f6
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec edx
inc ebx
cmp dword [esi + 0xe8], 0
mov dword [esp + 0x3c], edx
jne 0x525230
add edi, dword [esp + 0x14]
jmp 0x525234
add edi, dword [esp + 0x24]
test edx, edx
jne 0x5251d4
pop edi
pop ebp
pop ebx
pop esi
pop ecx
pop ecx
ret 0x24

Function at 0x525546
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push ecx
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 8], edx
test ebx, ebx
je 0x525620
imul eax, dword [esp + 0x1c], 3
mov ecx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
neg ecx
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x30]
push edi
imul edi, dword [esp + 0x30], 3
mov dword [esp + 0x10], ecx
add eax, dword [esp + 0x20]
add edi, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], edi
mov esi, dword [eax + 0xcc]
imul esi, ebp
mov dword [esp + 0x34], edi
add esi, dword [eax + 0xc8]
add esi, dword [esp + 0x28]
test edx, edx
jle 0x5255f6
mov ebp, dword [esp + 0x34]
mov ebx, 0xff
sub ebx, dword [esp + 0x40]
mov edi, edx
movzx eax, byte [esi]
movzx ecx, byte [ebp]
imul ecx, dword [esp + 0x40]
imul eax, ebx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
inc ebp
mov byte [esi], al
inc esi
dec edi
jne 0x5255be
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
dec ebx
inc ebp
cmp dword [eax + 0xe8], 0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], ebp
jne 0x52560d
add edi, ecx
jmp 0x525611
add edi, dword [esp + 0x24]
mov dword [esp + 0x38], edi
test ebx, ebx
jne 0x525594
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 0x28
Function at 0x525c40
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
push esi
mov esi, dword [esp + 0x30]
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0xd4]
mov dword [esp + 8], eax
test esi, esi
je 0x525cf5
imul eax, dword [esp + 0x20]
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
neg eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
imul eax, dword [esp + 0x34]
add eax, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x28]
mov ecx, dword [edi + 0xcc]
mov ebp, edx
imul ecx, ebx
add ecx, dword [edi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x525cd6
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 3]
xor byte [ecx], al
add ecx, edi
dec esi
jne 0x525cb1
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec esi
inc ebx
cmp dword [edi + 0xe8], 0
mov dword [esp + 0x3c], esi
jne 0x525ceb
add edx, dword [esp + 0x14]
jmp 0x525cef
add edx, dword [esp + 0x24]
test esi, esi
jne 0x525c8f
pop ebp
pop ebx
pop edi
pop esi
pop ecx
pop ecx
ret 0x24
Function at 0x527e01
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
push esi
push edi
xor edi, edi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push closesocket
push dword [esp + 0x2c]
mov ebp, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x527e85
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
push edi
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x527e7d
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x527e6e
cmp dword [esp + 0x18], ebx
jne 0x527e6e
push ebx
push edi
push dword [esp + 0x1c]
call fcn.00527672
mov ebp, eax
push edi
push 0
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc

Function at 0x528259
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
xor ebp, ebp
push esi
test ebx, ebx
je 0x52826d
mov esi, ebx
jmp 0x528277
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov esi, eax
test esi, esi
je 0x528368
lea eax, [esp + 0x18]
push eax
push 0x18
pop eax
push eax
push dword [esp + 0x68]
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x52835d
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push edi
mov edi, dword [esp + 0x24]
push 0x2c
push 0
push eax
mov dword [esp + 0x20], ebp
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [esp + 0x34], 0x28
xor eax, eax
mov dword [esp + 0x38], ebp
inc eax
mov dword [esp + 0x3c], edi
mov word [esp + 0x40], ax
xor ecx, ecx
push 0x18
pop eax
push ecx
push ecx
mov word [esp + 0x4a], ax
lea eax, [esp + 0x18]
push eax
push ecx
lea eax, [esp + 0x44]
mov dword [esp + 0x54], ecx
push eax
push esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x52835c
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x18]
push edi
push 0
push dword [esp + 0x78]
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
imul edi, dword [esp + 0x14]
test edi, edi
jle 0x52835c
mov ebx, dword [esp + 0x10]
push 3
pop ebp
movzx ecx, byte [ebx + 1]
movzx eax, byte [ebx + 2]
add eax, ecx
movzx ecx, byte [ebx]
add eax, ecx
cdq
idiv ebp
mov byte [ebx], al
mov ecx, dword [esp + 0x10]
mov byte [ecx + 1], al
mov ecx, dword [esp + 0x10]
mov byte [ecx + 2], al
mov ebx, dword [esp + 0x10]
add ebx, ebp
mov dword [esp + 0x10], ebx
dec edi
jne 0x528325
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x18]
pop edi
test ebx, ebx
jne 0x528368
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x50
ret 8
Function at 0x52a680
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x52a6b2
push 0
lea ecx, [esp + 0x10]
push ecx
push esi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x52a6ad
cmp dword [esp + 0xc], esi
je 0x52a6c9
pop edi
xor eax, eax
pop esi
ret
mov eax, dword [edi + 4]
add eax, dword [edi + 8]
push esi
push dword [esp + 0x14]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [edi + 8], esi
pop edi
mov eax, 1
pop esi
ret
Function at 0x52a835
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc
push ebx
push esi
mov esi, dword [esp + 0x3c]
xor ebx, ebx
cmp esi, 1
je 0x52a865
cmp esi, 2
je 0x52a865
cmp esi, 4
je 0x52a865
cmp esi, 8
je 0x52a865
cmp esi, 0x18
je 0x52a865
cmp esi, 0x20
je 0x52a865
xor eax, eax
jmp 0x52aa2f
mov ecx, dword [0x6b38bc]
push ebp
push edi
xor edi, edi
mov dword [esp + 0x10], edi
test ecx, ecx
jle 0x52aa2b
mov edx, dword [esp + 0x28]
mov eax, dword [edi*4 + 0x6b3e7c]
cmp dword [eax], edx
je 0x52a898
inc edi
mov dword [esp + 0x10], edi
cmp edi, ecx
jl 0x52a87f
jmp 0x52aa2b
cmp dword [esp + 0x38], 0x20
jne 0x52aa02
mov eax, dword [eax + 8]
test eax, eax
je 0x52a8d8
cmp esi, 0x20
je 0x52a8b4
cmp esi, 0xffffffff
jne 0x52a8d8
push esi
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call eax
jmp 0x52aa29
mov eax, dword [esp + 0x2c]
inc eax
imul ebp, eax, 3
and ebp, 0xfffffffc
mov eax, ebp
mov dword [esp + 0x14], ebp
imul eax, dword [esp + 0x30]
push eax
push 0
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x52aa2b
mov ebx, dword [esp + 0x30]
test ebx, ebx
jle 0x52a9cd
mov edx, dword [esp + 0x24]
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ecx
mov esi, edx
test eax, eax
jle 0x52a9ad
mov ebp, ecx
mov edi, eax
mov ecx, 0xff
movzx eax, byte [esi + 2]
sub eax, ecx
movzx ecx, byte [esi + 3]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp + 2], al
movzx eax, byte [esi + 1]
sub eax, ecx
movzx ecx, byte [esi + 3]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp + 1], al
movzx eax, byte [esi]
lea esi, [esi + 4]
sub eax, ecx
movzx ecx, byte [esi - 1]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp], al
lea ebp, [ebp + 3]
dec edi
jne 0x52a93e
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
add edx, dword [esp + 0x34]
add ecx, ebp
dec dword [esp + 0x24]
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], ecx
jne 0x52a92b
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x10]
mov eax, dword [edi*4 + 0x6b3e7c]
push esi
push dword [esp + 0x44]
mov esi, dword [esp + 0x20]
push dword [esp + 0x44]
push ebp
push ebx
push dword [esp + 0x40]
push esi
push dword [esp + 0x3c]
call dword [eax + 4]
push esi
push 0
push dword [0x6b00f0]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x52aa2b
cmp dword [esp + 0x38], 0x18
jne 0x52aa2b
push esi
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call dword [eax + 4]
mov ebx, eax
pop edi
mov eax, ebx
pop ebp
pop esi
pop ebx
add esp, 0xc
ret 0x28
Function at 0x52eed9
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x6b3900]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x52ef3a
push esi
push dword [0x6b38fc]
push 8
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x6b3900]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x6b38f8]
jmp 0x52ef2a
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x52ef28
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x52ef18
push edi
push 0x52ee77
call fcn.005c3d2a
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

Function at 0x52ef44
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ecx, esi
push edi
and ecx, 3
je 0x52ef5a
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x6b38fc]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x52ef91
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x6b00f0]
mov dword [0x6b3900], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x6b3900]
call ebx
mov eax, dword [0x6b38fc]
mov edi, eax
add eax, esi
push eax
push dword [0x6b3900]
mov dword [0x6b38fc], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x6b3900]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x52efd1
test ebx, ebx
je 0x52eff2
push 0x14
push 0x6b38f8
call fcn.0052f888
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x52eff2
lea ecx, [edi + ebp]
push ecx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x52f9e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6ad0d4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
add edx, 2
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
mov esp, ebp
pop ebp
ret