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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x18]
imul eax, edi
add eax, edx
cmp edx, eax
mov dword [ebp - 0x14], eax
jae 0x4d106d
mov eax, dword [ebp + 0x10]
lea eax, [edx + eax*4]
push ebx
push esi
mov dword [ebp + 0x14], eax
mov esi, 0xffc03fc0
mov eax, 0xff00ff
cmp edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
jae 0x4d1051
mov ebx, dword [ebp + 0x14]
sub ebx, edx
dec ebx
shr ebx, 3
lea ecx, [edx + 4]
inc ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ebx
mov edx, dword [ecx + edi]
mov edi, dword [edi + ecx - 4]
mov dword [ebp - 8], edi
shr edi, 2
and edi, esi
mov dword [ebp + 0x10], edx
mov edx, dword [ecx]
mov ecx, dword [ecx - 4]
mov ebx, ecx
shr ebx, 2
and ebx, esi
add ebx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ebx, edi
mov edi, edx
shr edi, 2
and edi, esi
lea ebx, [ebx + edi - 0x7fff80]
mov edi, dword [ebp - 8]
and edi, eax
mov esi, ecx
and esi, eax
add esi, edi
mov edi, dword [ebp + 0x10]
and edi, eax
add esi, edi
mov edi, edx
and edi, eax
lea esi, [esi + edi + 0x20002]
mov edi, dword [ebp - 8]
shr ecx, 2
shr esi, 2
xor ebx, esi
shr edi, 2
mov esi, 0x3fc03fc0
and ecx, esi
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x18]
shr edx, 2
and edx, esi
lea ecx, [ecx + edx + 0x800080]
and ebx, eax
xor ebx, ecx
mov ecx, dword [ebp - 4]
add dword [ebp - 4], 4
mov dword [ecx], ebx
mov ecx, dword [ebp - 0xc]
add ecx, 8
dec dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
mov esi, 0xffc03fc0
jne 0x4d0fa3
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
add dword [ebp + 8], ecx
lea ecx, [edi + edi]
add dword [ebp + 0x14], ecx
add edx, ecx
cmp edx, dword [ebp - 0x14]
mov dword [ebp + 0xc], edx
jb 0x4d0f81
pop esi
pop ebx
xor eax, eax
pop edi
leave
ret 0x18

Function at 0x4d1ab5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0x1343754
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4d1b0c
push esi
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x4d1b0c
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x4d1b0c
xor eax, eax
inc eax
jmp 0x4d1b0e
xor eax, eax
leave
ret 0x10
Function at 0x4d1b37
Capabilities:
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push edi
lea eax, [ebp - 4]
push eax
push 0x1343754
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edi, edi
test eax, eax
jne 0x4d1ba5
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push 0x1343f7c
push dword [ebp - 4]
mov dword [ebp - 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4d1b9c
cmp dword [ebp - 0xc], 4
jne 0x4d1b9c
cmp dword [ebp - 0x10], edi
je 0x4d1b9c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x144a230], edi
xor eax, eax
jmp 0x4d1be4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x144a230], edi
jge 0x4d1bdf
lea eax, [ebp - 0x34]
push eax
mov dword [0x144a230], edi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [ebp - 0x34], di
jne 0x4d1bdf
cmp word [ebp - 0x14], 5
jb 0x4d1bdf
call fcn.004d1b12
test eax, eax
je 0x4d1bdf
emms
mov dword [0x144a230], 1
mov eax, dword [0x144a230]
pop edi
leave
ret

Function at 0x4ffbbb
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4ffbf3
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004fdc48
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004fdc20
jmp 0x4ffbff
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x5012ad
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x5012ef
call fcn.00507021
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x5012ef
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x5012e6
xor eax, eax
jmp 0x5012f7
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.005012fd
pop edi
pop esi
pop ebx
ret 4

Function at 0x507551
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x50757f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x50759d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.005074b7
jmp 0x50759d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x50759d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.005074b7
test edi, edi
mov eax, edi
jne 0x507587
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0xd6a058
Capabilities:
Decompress data using aplib

Disassembly:
call 0xd6a1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xd6a07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd6a06a
add dl, dl
jne 0xd6a089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd6a0dc
xor eax, eax
add dl, dl
jne 0xd6a096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd6a17d
add dl, dl
jne 0xd6a0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd6a0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd6a0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd6a0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xd6a0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xd6a075
mov eax, 1
add dl, dl
jne 0xd6a0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd6a0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd6a0e1
sub eax, ebx
mov ebx, 1
jne 0xd6a128
mov ecx, 1
add dl, dl
jne 0xd6a10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xd6a119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd6a105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd6a075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xd6a13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xd6a14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd6a136
cmp eax, 0x7d00
jae 0xd6a16d
cmp eax, 0x500
jb 0xd6a168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd6a075
cmp eax, 0x7f
ja 0xd6a170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd6a075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xd6a19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0xd6a075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x4081c0
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x88]
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x5c], 8
mov dword [ebp - 0x58], 2
mov dword [ebp - 0x54], 4
mov dword [ebp - 0x50], 0x10
mov dword [ebp - 0x4c], pe_nt_image_headers32
mov dword [ebp - 0x48], 0x20
mov dword [ebp - 0x44], reloc.ole32.dll_CoInitialize
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov dword [ebp - 8], eax
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov ecx, dword [eax + 0x30]
mov eax, dword [edx + 0x3c]
lea eax, [ecx + eax]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0xc]
lea eax, [eax + 0xf8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x38]
lea ebx, [eax - 1]
mov dword [ebp - 0x24], 0
cmp ebx, dword [ebp - 0x24]
jb 0x408390
sub dword [ebp - 0x24], 1
mov esi, esi
add dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x24]
imul edx, eax, 0x28
mov eax, dword [ebp - 0x10]
lea esi, [edx + eax]
lea edi, [ebp - 0x88]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x80]
mov eax, dword [ebp - 0x3c]
or eax, edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x408292
jmp 0x408297
jmp 0x408387
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
and eax, 0x2000000
test eax, 0xffffffff
jne 0x4082ae
jmp 0x4082c4
push 0x4000
push dword [ebp - 0x30]
push dword [ebp - 0x40]
mov eax, dword [ebp - 4]
call dword [eax + 8]
jmp 0x408387
mov eax, dword [ebp - 0x34]
and eax, 0x20000000
test eax, 0xffffffff
jne 0x4082d5
jmp 0x4082de
mov dword [ebp - 0x14], 1
jmp 0x4082e5
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x34]
and eax, 0x40000000
test eax, 0xffffffff
jne 0x4082f6
jmp 0x4082ff
mov dword [ebp - 0x18], 1
jmp 0x408306
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x34]
and eax, 0x80000000
test eax, 0xffffffff
jne 0x408317
jmp 0x408320
mov dword [ebp - 0x1c], 1
jmp 0x408327
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x34]
and eax, 0x4000000
test eax, 0xffffffff
jne 0x408338
jmp 0x408341
mov dword [ebp - 0x20], 1
jmp 0x408348
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x14]
shl eax, 4
mov ecx, dword [ebp - 0x18]
lea eax, [ebp + eax - 0x60]
mov edx, dword [ebp - 0x1c]
lea eax, [eax + ecx*8]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], 1
je 0x408369
jmp 0x408374
mov eax, dword [ebp - 0x28]
or eax, 0x200
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x30]
push dword [ebp - 0x40]
mov eax, dword [ebp - 4]
call dword [eax + reloc.ole32.dll_CoInitializeSecurity]
cmp ebx, dword [ebp - 0x24]
ja 0x40825c
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40894e
Capabilities:
Encode data using xor

Disassembly:
push 0x4085d8
mov edi, dword [esp]
add esp, 4
call fcn.00408981
sub esp, 4
mov dword [esp], 0x13ca345
pop ecx
xor dword [edx], edi
add ecx, 0xd2eb1f90
sub ecx, 0xebff5bf
inc edx
cmp edx, eax
jne fcn.0040894e
ret
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
nop
pop eax
nop
add eax, 0x40a063
nop
sub eax, 0x40a009
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x433030
nop
nop
nop
nop
add eax, 0xc
cmp dword [eax], 0
nop
nop
nop
nop
nop
nop
jne 0x43301e
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x404400
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
xor eax, eax
cmp dword [esp + 0x20], 0
je 0x4044e0
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x4044e0
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x40444a
mov ecx, 0x1505
xor edi, edi
nop
movzx edx, byte [ebx + edi]
test edx, edx
je 0x404451
mov esi, ecx
shl esi, 5
add esi, ecx
add esi, edx
inc edi
mov ecx, esi
cmp ebp, edi
jne 0x404430
jmp 0x404453
mov esi, 0x1505
jmp 0x404453
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov ebx, dword [ecx + 0x20]
lea edx, [ebx - 1]
mov ecx, ebx
sub ecx, 1
mov dword [esp + 8], ecx
jb 0x4044e0
mov ecx, esi
not ecx
or edx, ecx
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
lea ebp, [esi + edx]
inc ebp
jmp 0x404484
inc ebp
dec ebx
je 0x4044de
mov eax, ebp
and eax, dword [esp + 8]
mov edx, dword [esp + 4]
mov edi, dword [edx + eax*4]
cmp edi, 0xffffffff
je 0x4044de
mov eax, dword [ecx + 8]
cmp dword [eax + edi*4], esi
jne 0x404480
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + edi*4]
mov dword [esp], eax
push eax
call fcn.0040c780
mov ecx, dword [esp + 0x24]
add esp, 4
cmp eax, dword [esp + 0x28]
jne 0x404480
push dword [esp + 0x28]
push dword [esp + 4]
push dword [esp + 0x2c]
call fcn.0040c7a0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
test eax, eax
jne 0x404480
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + edi*4]
jmp 0x4044e0
xor eax, eax
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x404c70
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov eax, 0xffffffff
cmp dword [esp + 0x24], 0
je 0x404d8a
mov esi, dword [esp + 0x28]
test esi, esi
je 0x404d8a
cmp dword [esp + 0x2c], 0
je 0x404d8a
push esi
call fcn.0040c780
add esp, 4
test eax, eax
je 0x404cda
mov ecx, 0x1505
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esi + edi]
test edx, edx
je 0x404ce1
mov ebx, ecx
shl ebx, 5
add ebx, ecx
add ebx, edx
inc edi
mov ecx, ebx
cmp eax, edi
jne 0x404cc0
jmp 0x404ce3
mov ebx, 0x1505
jmp 0x404ce3
mov ebx, ecx
mov ecx, dword [esp + 0x24]
mov esi, dword [ecx + 0x20]
lea edx, [esi - 1]
mov edi, ebx
not edi
mov ebp, esi
sub ebp, 1
mov dword [esp + 0xc], ebp
mov dword [esp + 4], edi
jae 0x404d92
mov ebp, 0xffffffff
mov eax, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x1c]
jb 0x404d4f
call fcn.004059b0
mov ecx, eax
mov eax, 0xffffffff
test ecx, ecx
mov ecx, dword [esp + 0x28]
jne 0x404d8a
push ecx
call fcn.0040c780
add esp, 4
mov dword [esp], eax
mov ecx, dword [esp + 0x24]
mov esi, dword [ecx + 0x20]
lea eax, [esi - 1]
mov edx, esi
sub edx, 1
mov dword [esp + 0xc], edx
jae 0x404e10
mov ebp, 0xffffffff
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 0x18]
mov esi, dword [esp + 0x28]
mov dword [eax + edx*4], esi
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x18]
mov dword [eax + ebp*4], edx
mov eax, dword [ecx + 0x10]
mov esi, dword [esp + 0x2c]
mov dword [eax + edx*4], esi
mov eax, dword [ecx + 0x14]
mov edx, dword [ecx + 0x18]
mov dword [eax + edx*4], ebp
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0x18]
mov dword [eax + edx*4], ebx
inc dword [ecx + 0x18]
mov eax, dword [ecx]
mov dword [esi], eax
xor eax, eax
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp], eax
or edx, edi
mov eax, dword [ecx + 4]
mov dword [esp + 8], eax
lea edi, [ebx + edx]
inc edi
jmp 0x404db8
inc edi
dec esi
je 0x404d04
mov ebp, edi
and ebp, dword [esp + 0xc]
mov eax, dword [esp + 8]
mov eax, dword [eax + ebp*4]
cmp eax, 0xffffffff
je 0x404d09
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebx
jne 0x404db0
mov ecx, dword [ecx + 0xc]
mov ebp, dword [ecx + eax*4]
push ebp
call fcn.0040c780
mov ecx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp]
jne 0x404db0
push dword [esp]
push ebp
push dword [esp + 0x30]
call fcn.0040c7a0
mov ecx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x404db0
mov eax, 0xffffffff
jmp 0x404d8a
or eax, dword [esp + 4]
mov edx, dword [ecx + 4]
mov dword [esp + 8], edx
lea edi, [ebx + eax]
inc edi
jmp 0x404e38
inc edi
dec esi
je 0x404d4a
mov ebp, edi
and ebp, dword [esp + 0xc]
mov eax, dword [esp + 8]
mov eax, dword [eax + ebp*4]
cmp eax, 0xffffffff
je 0x404d4f
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebx
jne 0x404e30
mov ecx, dword [ecx + 0xc]
mov eax, dword [ecx + eax*4]
mov dword [esp + 4], eax
push eax
call fcn.0040c780
mov ecx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp]
jne 0x404e30
push dword [esp]
push dword [esp + 8]
push dword [esp + 0x30]
call fcn.0040c7a0
mov ecx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x404e30
jmp 0x404d4f
Function at 0x4056f0
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, 0xffffffff
cmp dword [esp + 0x28], 0
je 0x4058da
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x4058da
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x4058da
cmp dword [ecx], 0
jne 0x4058da
push esi
call fcn.0040c780
add esp, 4
test eax, eax
je 0x40575a
mov ecx, 0x1505
xor ebx, ebx
nop
nop
nop
nop
movzx edx, byte [esi + ebx]
test edx, edx
je 0x405761
mov edi, ecx
shl edi, 5
add edi, ecx
add edi, edx
inc ebx
mov ecx, edi
cmp eax, ebx
jne 0x405740
jmp 0x405763
mov edi, 0x1505
jmp 0x405763
mov edi, ecx
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + 0x20]
lea esi, [edx - 1]
mov ebx, edx
sub ebx, 1
mov dword [esp + 0xc], ebx
jae 0x405834
mov ebp, 0xffffffff
mov eax, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x1c]
jb 0x4057c1
call fcn.004059b0
mov ecx, eax
mov eax, 0xffffffff
test ecx, ecx
mov esi, dword [esp + 0x2c]
jne 0x4058da
push esi
call fcn.0040c780
add esp, 4
mov edx, esi
lea esi, [esp + 0x10]
mov ecx, dword [esp + 0x28]
push esi
push edi
push eax
call fcn.004058f0
add esp, 0xc
mov ebp, eax
mov esi, dword [esp + 0x2c]
push esi
call fcn.0040c780
add esp, 4
mov ebx, eax
inc eax
push eax
call dword [0x449008]
add esp, 4
test eax, eax
je 0x4058d5
mov byte [eax + ebx], 0
push ebx
push esi
push eax
mov esi, eax
call fcn.0040c670
add esp, 0xc
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 0x18]
mov dword [eax + ecx*4], esi
mov eax, dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov dword [eax + ebp*4], ecx
mov eax, dword [edx + 0x10]
mov esi, dword [esp + 0x30]
mov dword [eax + ecx*4], esi
mov eax, dword [edx + 0x14]
mov ecx, dword [edx + 0x18]
mov dword [eax + ecx*4], ebp
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0x18]
mov dword [eax + ecx*4], edi
inc dword [edx + 0x18]
mov eax, dword [edx]
mov dword [esi], eax
xor eax, eax
jmp 0x4058da
mov dword [esp], eax
mov eax, edx
mov edx, edi
not edx
or esi, edx
mov edx, eax
mov eax, dword [ecx + 4]
mov dword [esp + 8], eax
lea ebx, [edi + esi]
inc ebx
jmp 0x405858
inc ebx
dec edx
je 0x40577c
mov ebp, ebx
and ebp, dword [esp + 0xc]
mov eax, dword [esp + 8]
mov esi, dword [eax + ebp*4]
cmp esi, 0xffffffff
je 0x405781
mov eax, dword [ecx + 8]
cmp dword [eax + esi*4], edi
jne 0x405850
mov eax, dword [ecx + 0xc]
mov ebp, dword [eax + esi*4]
push ebp
mov dword [esp + 8], edx
call fcn.0040c780
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0x2c]
add esp, 4
cmp eax, dword [esp]
jne 0x405850
push dword [esp]
push ebp
push dword [esp + 0x34]
call fcn.0040c7a0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
add esp, 0xc
test eax, eax
jne 0x405850
mov eax, dword [ecx + 0x10]
push dword [eax + esi*4]
call fcn.00404810
mov edx, dword [esp + 0x2c]
add esp, 4
mov eax, dword [edx + 0x10]
mov ecx, dword [esp + 0x30]
mov dword [eax + esi*4], ecx
mov esi, ecx
jmp 0x405829
mov eax, 0xffffffff
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4069a0
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x406b46
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
movzx edi, cx
shr ecx, 0x10
test esi, esi
je 0x406b3f
mov edx, 0x5e6ea9af
mov eax, esi
mul edx
shr edx, 0xb
imul eax, edx, 0x15b0
mov edx, esi
sub edx, eax
jmp 0x406a35
mov eax, dword [esp]
sub eax, dword [esp + 4]
add ebp, eax
mov esi, dword [esp + 8]
mov eax, edi
mov edx, 0x80078071
mul edx
mov ebx, edx
shr ebx, 0xf
mov eax, ecx
mov edx, 0x80078071
mul edx
imul eax, ebx, 0xfff1
sub edi, eax
shr edx, 0xf
imul eax, edx, 0xfff1
sub ecx, eax
sub esi, dword [esp]
mov edx, 0x15b0
je 0x406b3f
xor ebx, ebx
cmp edx, 8
mov dword [esp], edx
mov dword [esp + 8], esi
jb 0x406aae
mov ebx, edx
and ebx, 0x1ff8
xor eax, eax
nop
nop
nop
mov edx, eax
movzx eax, byte [ebp + eax]
add eax, edi
add ecx, eax
movzx esi, byte [ebp + edx + 1]
add esi, eax
add ecx, esi
movzx eax, byte [ebp + edx + 2]
add eax, esi
add ecx, eax
movzx esi, byte [ebp + edx + 3]
add esi, eax
add ecx, esi
movzx eax, byte [ebp + edx + 4]
add eax, esi
add ecx, eax
movzx esi, byte [ebp + edx + 5]
add esi, eax
add ecx, esi
movzx eax, byte [ebp + edx + 6]
add eax, esi
add ecx, eax
movzx edi, byte [ebp + edx + 7]
add edi, eax
add ecx, edi
lea eax, [edx + 8]
add edx, 0xf
cmp edx, dword [esp]
mov edx, dword [esp]
jb 0x406a50
add ebp, eax
mov esi, dword [esp + 8]
mov eax, ebx
sub eax, edx
jae 0x4069fd
mov dword [esp + 0xc], eax
mov eax, edx
and eax, 3
mov dword [esp + 4], ebx
je 0x406af0
neg eax
xor ebx, ebx
mov edx, ebp
nop
nop
nop
movzx esi, byte [edx]
inc edx
add edi, esi
add ecx, edi
dec ebx
cmp eax, ebx
jne 0x406ad0
mov eax, dword [esp + 4]
sub eax, ebx
cmp dword [esp + 0xc], 0xfffffffc
ja 0x4069f0
jmp 0x406aff
mov eax, ebx
mov edx, ebp
cmp dword [esp + 0xc], 0xfffffffc
ja 0x4069f0
mov ebx, dword [esp]
sub ebx, eax
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax]
add esi, edi
add ecx, esi
movzx edi, byte [edx + eax + 1]
add edi, esi
add ecx, edi
movzx esi, byte [edx + eax + 2]
add esi, edi
add ecx, esi
movzx edi, byte [edx + eax + 3]
add edi, esi
add ecx, edi
add eax, 4
cmp ebx, eax
jne 0x406b10
jmp 0x4069f0
shl ecx, 0x10
or ecx, edi
jmp 0x406b4b
mov ecx, 1
mov eax, ecx
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x406b60
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x406b8e
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
not ecx
test ebx, ebx
je 0x406c2a
test bl, 1
jne 0x406b95
mov edx, ebx
cmp ebx, 1
jne 0x406bc6
jmp 0x406c2a
xor eax, eax
jmp 0x406c31
lea edx, [ebx - 1]
movzx esi, byte [eax]
mov edi, ecx
shr edi, 4
xor ecx, esi
and ecx, 0xf
xor edi, dword [ecx*4 + 0x446c50]
inc eax
mov ecx, edi
shr ecx, 4
and edi, 0xf
shr esi, 4
xor esi, edi
xor ecx, dword [esi*4 + 0x446c50]
cmp ebx, 1
je 0x406c2a
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [eax + esi]
mov ebx, ecx
shr ebx, 4
xor ecx, edi
and ecx, 0xf
xor ebx, dword [ecx*4 + 0x446c50]
mov ecx, ebx
shr ecx, 4
and ebx, 0xf
shr edi, 4
xor edi, ebx
xor ecx, dword [edi*4 + 0x446c50]
movzx edi, byte [eax + esi + 1]
mov ebx, ecx
shr ebx, 4
xor ecx, edi
and ecx, 0xf
xor ebx, dword [ecx*4 + 0x446c50]
mov ecx, ebx
shr ecx, 4
and ebx, 0xf
shr edi, 4
xor edi, ebx
xor ecx, dword [edi*4 + 0x446c50]
add esi, 2
cmp edx, esi
jne 0x406bd0
lea eax, [ecx + ecx]
not eax
add eax, ecx
pop esi
pop edi
pop ebx
ret