joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4f0190
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push 0x1000
push 0
push dword [0xd927c4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 8], edx
test edx, edx
je 0x4f034f
mov ax, word [esp + 0x1c]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x18], 0x7ff
mov ecx, dword [esp + 0x30]
cmp ecx, 0xffffffff
je 0x4f01e9
test ecx, ecx
je 0x4f02ac
dec ecx
mov dword [esp + 0x30], ecx
cmp dword [ebx + 4], 0
lea ebp, [ebx + 4]
je 0x4f0205
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.004efec0
mov dword [esp + 0x10], eax
jmp 0x4f021f
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 2
mov ax, word [esp + 0x28]
jne 0x4f02af
test ax, ax
je 0x4f023d
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x28]
mov edx, dword [esp + 0x14]
mov esi, edi
mov ecx, dword [esp + 0x18]
sub esi, edx
sar esi, 1
cmp esi, ecx
jle 0x4f0284
mov eax, dword [esp + 0x1c]
add ecx, 0x800
add eax, 0x1000
mov dword [esp + 0x18], ecx
push eax
push edx
push 8
push dword [0xd927c4]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
mov ax, word [esp + 0x28]
mov dword [esp + 0x14], edx
lea edi, [edx + esi*2]
test ax, ax
je 0x4f02af
cmp dword [esp + 0x2c], 0
jne 0x4f01d3
cmp ax, 0xd
je 0x4f02b6
cmp ax, 0xa
jne 0x4f01d3
sub edi, 2
jmp 0x4f032e
lea ebp, [ebx + 4]
cmp dword [esp + 0x2c], 0
jne 0x4f032e
cmp ax, 0xa
jne 0x4f02c1
sub edi, 2
jmp 0x4f032e
cmp ax, 0xd
jne 0x4f032e
sub edi, 2
cmp dword [ebp], 0
je 0x4f02e3
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.004efec0
mov dword [esp + 0x10], eax
jmp 0x4f02f9
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x28], 0xa
je 0x4f032e
cmp dword [ebp], 0
je 0x4f030d
add dword [ebx + 0xc], 2
jmp 0x4f032e
push 1
lea eax, [esp + 0x24]
mov dword [esp + 0x20], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, edi
sub ecx, dword [esp + 0x14]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10
Function at 0x4f0360
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0xd927c4]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x4f04b0
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x4f03ac
test edi, edi
je 0x4f041d
dec edi
push esi
push ebp
call fcn.005254f0
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4f03bf
xor cl, cl
jmp 0x4f03c1
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x4f0404
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0xd927c4]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x4f041d
test eax, eax
jne 0x4f03a2
cmp cl, 0xd
je 0x4f0421
cmp cl, 0xa
jne 0x4f03a2
dec esi
jmp 0x4f0493
test eax, eax
jne 0x4f0493
cmp cl, 0xa
jne 0x4f0429
dec esi
jmp 0x4f0493
cmp cl, 0xd
jne 0x4f0493
dec esi
cmp dword [ebp + 4], 0
je 0x4f0448
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.004efec0
mov dword [esp + 0x20], eax
jmp 0x4f045f
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x4f0493
cmp dword [ebp + 4], 0
je 0x4f0471
inc dword [ebp + 0xc]
jmp 0x4f0493
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x4f04c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], 0
cmp dword [edi + 0x1c], 0
jne 0x4f05d7
cmp dword [edi + 0x14], 1
push ebx
push ebp
jne 0x4f050d
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x10]
push 1
neg eax
cdq
push ecx
push eax
push dword [edi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0xc]
push esi
mov esi, dword [esp + 0x24]
cmp eax, esi
jle 0x4f0596
mov ecx, dword [edi + 4]
sub ecx, eax
mov eax, esi
add ecx, dword [edi + 8]
sub eax, 1
je 0x4f057f
sub eax, 1
je 0x4f0566
sub eax, 2
je 0x4f054f
push esi
push dword [esp + 0x24]
push ecx
call fcn.004adfa0
add esp, 0xc
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [ecx], ax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov al, byte [eax]
mov byte [ecx], al
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
push edi
call fcn.00482740
mov eax, dword [edi + 8]
cmp esi, eax
jl 0x4f05c5
push 0
lea eax, [esp + 0x20]
push eax
push esi
push dword [esp + 0x2c]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov ecx, dword [edi + 4]
sub ecx, dword [edi + 0xc]
push esi
push dword [esp + 0x24]
add ecx, eax
jmp 0x4f0537
xor eax, eax
pop edi
add esp, 8
ret 0xc

Function at 0x4f135f
Capabilities:
Hash data using sha256

Disassembly:
mov eax, dword [esp + 4]
push 0x20
pop ecx
push ecx
and dword [eax + 0x40], 0
and dword [eax + 0x44], 0
mov dword [eax + 0x68], ecx
add eax, 0x48
push 0x556ec0
push eax
call fcn.004adfa0
add esp, 0xc
ret
Function at 0x4f2bf3
Capabilities:
Hash data using sha384

Disassembly:
mov eax, dword [esp + 4]
push 0x40
push 0x5571c0
and dword [eax + 0x80], 0
and dword [eax + 0x84], 0
mov dword [eax + 0xc8], 0x30
add eax, 0x88
push eax
call fcn.004adfa0
add esp, 0xc
ret

Function at 0x4f2c25
Capabilities:
Hash data using sha512

Disassembly:
mov eax, dword [esp + 4]
push 0x40
pop ecx
push ecx
and dword [eax + 0x80], 0
and dword [eax + 0x84], 0
mov dword [eax + 0xc8], ecx
add eax, 0x88
push 0x557180
push eax
call fcn.004adfa0
add esp, 0xc
ret
Function at 0x4f6369
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 4]
test edx, edx
jne 0x4f637a
mov eax, dword [esp + 0xc]
jmp 0x4f645c
mov ecx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
not ecx
cmp esi, 8
jb 0x4f643b
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
sub edi, 1
jne 0x4f6394
pop edi
test esi, esi
je 0x4f6457
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
inc edx
sub esi, 1
jne 0x4f643f
not ecx
mov eax, ecx
pop esi
ret 0xc
Function at 0x4f64d0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x94
test dword [esp + 0xa0], 0x10000
je 0x4f6662
push ebx
mov ebx, dword [esp + 0x9c]
test ebx, ebx
je 0x4f6661
mov eax, dword [ebx]
cdq
push ebp
mov ebp, dword [ebx + 4]
and edx, 7
push esi
add eax, edx
push edi
mov edi, dword [esp + 0xb4]
sar eax, 3
mov dword [esp + 0x10], eax
test edi, edi
jne 0x4f651c
mov edi, 0x581684
mov eax, dword [esp + 0xb8]
cmp eax, 0x18
jne 0x4f6540
push edi
call fcn.004b0170
mov edi, eax
mov esi, edi
lea eax, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x4f6535
sub esi, eax
jmp 0x4f6579
cmp eax, 0x19
jne 0x4f6563
mov esi, edi
lea ecx, [esi + 2]
lea ebx, [ebx]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4f6550
sub esi, ecx
sar esi, 1
add esi, esi
jmp 0x4f6579
push edi
call fcn.004947f0
mov edi, eax
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4f6570
sub esi, ecx
push esi
push edi
cmp esi, ebp
jle 0x4f65cc
mov esi, dword [esp + 0xb4]
push ebx
mov eax, dword [esi + 0xc]
call eax
mov eax, dword [esi + 0x10]
push ebx
call eax
mov esi, dword [esp + 0x10]
lea eax, [ebx + 8]
push esi
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004adfa0
mov eax, ebp
sub eax, esi
push eax
lea eax, [esp + 0x24]
add eax, esi
push 0
push eax
call fcn.004944c0
mov eax, dword [esp + 0xc4]
add esp, 0x18
mov eax, dword [eax + 8]
push 1
push ebx
call eax
jmp 0x4f65ec
lea eax, [esp + 0x1c]
push eax
call fcn.004adfa0
mov eax, ebp
sub eax, esi
push eax
lea eax, [esp + 0x24]
add eax, esi
push 0
push eax
call fcn.004944c0
add esp, 0x18
push ebp
lea eax, [esp + 0x18]
push eax
lea esi, [ebx + 0x48]
push esi
call fcn.004adfa0
add esp, 0xc
test ebp, ebp
jle 0x4f6621
lea eax, [esp + 0x14]
mov ecx, ebp
jmp 0x4f6610
xor byte [eax], 0x36
lea eax, [eax + 1]
xor byte [esi], 0x5c
lea esi, [esi + 1]
sub ecx, 1
jne 0x4f6610
push ebp
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0xb4]
push ebx
mov eax, dword [eax + 0xc]
call eax
mov eax, dword [esp + 0xb8]
cmp eax, 0x18
jne 0x4f6653
push edi
call fcn.00494880
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14
cmp eax, 0x19
je 0x4f665e
push edi
call fcn.00494880
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14
Function at 0x4f7b64
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0050b550
mov eax, dword [0xd91fe8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0050cb86
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4f7ba6
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4f7d02
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00516250
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0xd94cb0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0052602b
mov ecx, dword [esi*4 + 0xd94cb0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x4f7cfb
cmp eax, dword [ecx + edi + 0x24]
jne 0x4f7cfb
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4f7cfb
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0052602b
add esp, 0x14
test edx, edx
jl 0x4f7cfb
jg 0x4f7c71
test eax, eax
jb 0x4f7cfb
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4f7cfb
jl 0x4f7c8b
cmp dword [ebp - 0x1008], eax
ja 0x4f7cfb
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4f7ca9
test ebx, ebx
je 0x4f7ce2
cmp ecx, edi
jae 0x4f7ce2
mov al, byte [ecx]
cmp al, 0xd
jne 0x4f7cc3
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4f7ccf
cmp byte [ecx + 1], 0xa
jne 0x4f7ccf
inc ecx
jmp 0x4f7ccf
movzx eax, al
movsx eax, byte [eax + 0xd92030]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4f7ca9
cmp edx, ebx
jne 0x4f7ca9
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4f7d00
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0050cbba
leave
ret

Function at 0x4f8160
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 0x4f8198
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 0x4f8193
xor eax, eax
cmp dword [esp + 0xc], esi
pop edi
sete al
pop esi
ret
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 fcn.004adfa0
add dword [edi + 8], esi
add esp, 0xc
mov eax, 1
pop edi
pop esi
ret
Function at 0x4f8e50
Capabilities:
Get thread local storage value

Disassembly:
push dword [0xd91308]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
add eax, dword [esp + 4]
ret 4

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

Disassembly:
cmp dword [0xd949fc], 0
push ebx
push esi
mov esi, 0xd94a04
jne 0x4f8fb4
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0xd94a1c], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0xd949fc], 1
push dword [0xd94a1c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x4f9051
push 0x14
push 8
push dword [0xd927c4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x4f907b
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0xd94a00]
test eax, eax
je 0x4f8ff6
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0xd94a00], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x4f90fe
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0xd94a1c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0xd927c4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4f907b
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x4fb3bd
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x559d20
push 0x559d18
push str.FlsAlloc
push 0x1f
call fcn.004fb9b5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4fb3f1
push dword [ebp + 8]
mov ecx, esi
call dword [0x584854]
call esi
jmp 0x4fb3f7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4fb43b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x559d30
push 0x559d28
push str.FlsGetValue
push 0x21
call fcn.004fb9b5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4fb472
push dword [ebp + 8]
mov ecx, esi
call dword [0x584854]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4fb47a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x559d38
push 0x559d30
push str.FlsSetValue
push 0x22
call fcn.004fb9b5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4fb4b4
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x584854]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x517e79
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0xd94cb0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x517eb9
cmp byte [ebx], 0xa
jne 0x517eb9
or byte [edi + eax + 0x28], 4
jmp 0x517ebe
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x517fbd
mov dl, byte [eax]
cmp dl, 0x1a
je 0x517fa0
inc eax
cmp dl, 0xd
je 0x517eea
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x517f10
cmp eax, ecx
jae 0x517f1e
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x517ed2
jmp 0x517fbd
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x517f9b
cmp dword [ebp - 0x10], 0
je 0x517f9b
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0xd94cb0]
test byte [eax + edi + 0x28], 0x48
je 0x517f75
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x517f60
mov byte [esi], dl
jmp 0x517f71
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0xd94cb0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x517fbd
cmp byte [ebp - 1], 0xa
jne 0x517f84
cmp esi, ebx
jne 0x517f84
mov byte [esi], 0xa
jmp 0x517fbc
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00525fcd
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x517fbd
mov byte [esi], 0xd
jmp 0x517fbc
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0xd94cb0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x517fba
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x517fbd
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x517fc6
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0xd94cb0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x51800c
cmp word [ebx], dx
jne 0x51800c
or byte [eax + edi + 0x28], 4
jmp 0x518011
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x518174
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x518154
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x518052
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x518088
cmp eax, edx
jae 0x518096
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x51802d
jmp 0x518174
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x51814f
cmp dword [ebp - 0x18], 0
je 0x51814f
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0xd94cb0]
test byte [eax + edi + 0x28], 0x48
je 0x518125
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x5180e9
mov word [esi], cx
jmp 0x518120
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0xd94cb0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0xd94cb0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0xd94cb0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x518174
pop eax
cmp word [ebp - 4], ax
jne 0x518135
cmp esi, ebx
jne 0x518135
mov word [esi], ax
jmp 0x518171
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00525fcd
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x518174
push 0xd
pop eax
jmp 0x518130
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0xd94cb0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x51816e
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x518174
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x5225cc
Capabilities:
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x2c]
push edi
mov edi, dword [esp + 0x10]
mov eax, dword [edi + 0xd4]
mov dword [esp + 8], eax
test esi, esi
je 0x522678
imul eax, dword [esp + 0x1c]
imul ecx, dword [esp + 0x24], 3
push ebx
mov ebx, dword [esp + 0x24]
push ebp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x30]
add eax, dword [esp + 0x1c]
add ecx, eax
mov eax, dword [esp + 0x24]
mov edx, dword [edi + 0xcc]
mov ebp, ecx
imul edx, ebx
add edx, dword [edi + 0xc8]
add edx, eax
cmp dword [esp + 0x34], 0
jle 0x522659
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [edx + 2], al
mov al, byte [ebp + 1]
xor byte [edx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 3]
xor byte [edx], al
add edx, edi
sub esi, 1
jne 0x522632
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
dec esi
inc ebx
cmp dword [edi + 0xe8], 0
mov dword [esp + 0x38], esi
jne 0x52266e
sub ecx, dword [esp + 0x20]
jmp 0x522672
add ecx, dword [esp + 0x20]
test esi, esi
jne 0x522610
pop ebp
pop ebx
pop edi
pop esi
pop ecx
ret 0x24

Function at 0x5226f5
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push ecx
imul ecx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 4], ecx
test ebx, ebx
je 0x5227c7
mov eax, dword [esp + 0x18]
imul eax, dword [esp + 0x28]
imul edx, dword [esp + 0x1c], 3
push ebp
mov ebp, dword [esp + 0x24]
push esi
imul esi, dword [esp + 0x2c], 3
add eax, dword [esp + 0x1c]
push edi
mov dword [esp + 0x14], edx
add esi, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], esi
mov edi, dword [eax + 0xcc]
imul edi, ebp
mov dword [esp + 0x28], esi
add edi, dword [eax + 0xc8]
add edi, edx
test ecx, ecx
jle 0x52279b
mov ebp, dword [esp + 0x28]
mov ebx, 0xff
sub ebx, dword [esp + 0x40]
mov esi, ecx
movzx eax, byte [ebp]
imul eax, dword [esp + 0x40]
movzx ecx, byte [edi]
imul ecx, ebx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
inc ebp
mov byte [edi], al
inc edi
sub esi, 1
jne 0x522761
mov esi, 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 0x5227b4
sub esi, dword [esp + 0x24]
jmp 0x5227b8
add esi, dword [esp + 0x24]
mov dword [esp + 0x38], esi
test ebx, ebx
jne 0x522739
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 0x28