joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001340
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
lea ecx, [esi - 0x10000]
movzx eax, cx
mov edi, ecx
sub edi, eax
test eax, eax
cmove edi, ecx
cmp edi, ebx
jbe 0x10001409
lea eax, [edi - 0x70000000]
cmp eax, 0x10000000
ja 0x10001386
sub edi, 0x8000000
jmp 0x10001401
push 0x1c
lea eax, [ebp - 0x20]
mov dword [ebp - 8], 0
xorps xmm0, xmm0
push eax
push edi
movups xmmword [ebp - 0x20], xmm0
movq qword [ebp - 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10001409
cmp dword [ebp - 0x10], 0x10000
jne 0x100013ec
cmp dword [ebp - 0x14], 0x10000
jb 0x100013ec
push 0x40
push 0x3000
push 0x10000
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x100014c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x677
je 0x10001409
sub edi, 0x10000
jmp 0x10001401
mov ecx, dword [ebp - 0x1c]
add ecx, 0xffff0000
mov edi, ecx
movzx eax, di
sub edi, eax
test eax, eax
cmove edi, ecx
cmp edi, ebx
ja 0x10001371
movzx eax, si
test eax, eax
je 0x10001418
sub esi, eax
add esi, 0x10000
mov edi, dword [ebp + 8]
cmp esi, edi
jae 0x100014c2
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualQuery]
nop dword [eax]
lea eax, [esi - 0x70000000]
cmp eax, 0x10000000
ja 0x10001445
add esi, 0x8000000
jmp 0x100014ba
push 0x1c
lea eax, [ebp - 0x20]
mov dword [ebp - 8], 0
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x20], xmm0
movq qword [ebp - 0x10], xmm0
call ebx
test eax, eax
je 0x100014c2
cmp dword [ebp - 0x10], 0x10000
mov ecx, dword [ebp - 0x14]
jne 0x100014a5
cmp ecx, 0x10000
jb 0x100014a5
push 0x40
push 0x3000
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x100014c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x677
je 0x100014c2
add esi, 0x10000
jmp 0x100014ba
mov esi, dword [ebp - 0x20]
add esi, ecx
movzx ecx, si
test ecx, ecx
je 0x100014ba
mov eax, 0x10000
sub eax, ecx
add esi, eax
cmp esi, edi
jb 0x10001430
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10003277
mov esp, ebp
pop ebp
ret
Function at 0x100014e0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x10018390], 0
jne 0x10001569
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
mov edx, 0x10018390
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x10001569
push esi
mov esi, dword [0x1001839c]
mov dword [0x100183a4], eax
mov dword [0x100183a0], eax
mov dword [0x10018398], eax
push edi
test esi, esi
je 0x1000154a
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 0x10000
push esi
call edi
test eax, eax
je 0x10001561
mov esi, dword [esi + 4]
test esi, esi
jne 0x10001531
xor eax, eax
pop edi
mov dword [0x1001838c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10003277
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1000154c
mov ecx, dword [ebp - 4]
mov eax, 0x10dd
xor ecx, ebp
call fcn.10003277
mov esp, ebp
pop ebp
ret
Function at 0x100027d0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x10015480
push 0x10004180
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [section..data]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
lea esi, [ecx + 0x10000]
xorps xmm0, xmm0
movups xmmword [ebp - 0x38], xmm0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov edi, 0x5a4d
push 0x1c
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10002851
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.10003277
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x28], 0x1000
jne 0x100028cf
cmp byte [ebp - 0x24], 1
je 0x100028cf
test dword [ebp - 0x24], 0x100
jne 0x100028cf
mov dword [ebp - 4], 0
cmp word [esi], di
jne 0x1000288b
mov eax, dword [esi + 0x3c]
cmp eax, dword [ebp - 0x2c]
ja 0x1000288b
cmp eax, 0x40
jb 0x1000288b
cmp dword [eax + esi], 0x4550
je 0x1000289a
mov dword [ebp - 4], 0xfffffffe
mov esi, dword [ebp - 0x2c]
add esi, dword [ebp - 0x38]
jmp 0x10002824
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
jmp 0x10002835
mov esi, dword [ebp - 0x2c]
add esi, dword [ebp - 0x38]
jmp 0x10002824
Function at 0x100029f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x100154c0
push 0x10004180
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [section..data]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov ebx, ecx
test ebx, ebx
jne 0x10002a32
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
mov dword [ebp - 4], 0
mov eax, 0x5a4d
cmp word [ebx], ax
je 0x10002a4d
push 0xc1
jmp 0x10002b41
mov ecx, dword [ebx + 0x3c]
add ecx, ebx
mov dword [ebp - 0x24], ecx
cmp dword [ecx], 0x4550
je 0x10002a67
push 0xbf
jmp 0x10002b41
movzx eax, word [ecx + 0x14]
test ax, ax
je 0x10002b3c
lea edx, [eax + ecx]
mov dword [ebp - 0x1c], edx
lea edx, [eax + 0x18]
add edx, ecx
mov dword [ebp - 0x28], edx
xor esi, esi
mov dword [ebp - 0x20], esi
movzx eax, word [ecx + 6]
cmp esi, eax
jae 0x10002b3c
lea edi, [esi + esi*4]
mov ecx, str..detour
lea eax, [edx + edi*8]
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10002ac0
test dl, dl
je 0x10002abc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10002ac0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10002aa0
xor eax, eax
jmp 0x10002ac5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10002b1a
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + edi*8 + 0x24]
test eax, eax
je 0x10002b3c
cmp dword [ecx + edi*8 + 0x28], 0
je 0x10002b3c
lea esi, [eax + ebx]
mov eax, dword [esi]
cmp eax, 0x40
jb 0x10002b3c
cmp dword [esi + 4], 0x727444
jne 0x10002b3c
cmp dword [esi + 8], 0
jne 0x10002af7
mov dword [esi + 8], eax
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc esi
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
jmp 0x10002a84
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10003120
Capabilities:
Create thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub dword [ebp + 0xc], 1
jne 0x1000326e
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push edi
push 0
push 0
push 0
push 0x10002fb0
push 0
push 0
call esi
push 0
push 0
push 0
push 0x100030c0
push 0
push 0
call esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
xor ecx, ecx
mov dword [0x10018380], eax
mov eax, dword [sym.imp.GDI32.dll_CreateFontIndirectA]
mov dword [0x10018384], eax
mov eax, dword [sym.imp.GDI32.dll_CreateFontA]
mov dword [0x10018388], eax
call fcn.100027d0
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, eax
test esi, esi
je 0x100031ac
lea eax, [ebp + 0xc]
mov ecx, esi
push eax
call fcn.10002b70
test eax, eax
jne 0x10003211
mov ecx, esi
call fcn.100027d0
mov esi, eax
test esi, esi
jne 0x10003190
push 0x7e
call edi
push 0x7e
call edi
call fcn.100014e0
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp dword [0x1001838c], 0
mov esi, eax
jne 0x10003231
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp esi, eax
je 0x10003231
push 8
call fcn.10003285
add esp, 4
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x10003221
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 8
push edi
call fcn.100032b5
add esp, 8
mov dword [0x1001838c], esi
mov dword [0x10018398], 0
jmp 0x10003231
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x100031b0
mov ecx, eax
call fcn.10002c70
jmp 0x100031b4
mov eax, dword [0x100183a0]
mov dword [edi + 4], esi
mov dword [edi], eax
mov dword [0x100183a0], edi
sub esp, 0xc
mov edx, 0x10002ee0
mov ecx, 0x10018380
call fcn.100019e0
sub esp, 0xc
mov edx, 0x10002f40
mov ecx, 0x10018384
call fcn.100019e0
sub esp, 0xc
mov edx, 0x10002f70
mov ecx, 0x10018388
call fcn.100019e0
call fcn.10001580
pop edi
pop esi
mov eax, 1
pop ebp
ret 0xc

Function at 0x10006ac4
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10006b03
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10006b03
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10006b03
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10006b03
cmp dword [ecx + 0x74], 0xe
jbe 0x10006b03
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10009b86
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x10009c23
push ebx
push esi
call fcn.10009b4f
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.10009ae3
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10009bd0
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10009c22
push edi
push eax
call fcn.10007895
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10009bf0
call fcn.1000785b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10009c21
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10009ae3
add esp, 0x20
test eax, eax
jne 0x10009c0f
push edi
call fcn.1000785b
jmp 0x10009c17
push ebx
call fcn.1000785b
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x10009e90
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10011a30
push 0x10011a28
push str.FlsAlloc
push 0x1f
call fcn.10009dac
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10009ec4
push dword [ebp + 8]
mov ecx, esi
call dword [0x1001014c]
call esi
jmp 0x10009eca
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10009f0e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10011a40
push 0x10011a38
push str.FlsGetValue
push 0x21
call fcn.10009dac
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10009f45
push dword [ebp + 8]
mov ecx, esi
call dword [0x1001014c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10009f4d
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10011a48
push 0x10011a40
push str.FlsSetValue
push 0x22
call fcn.10009dac
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10009f87
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1001014c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1000ef60
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1000ef8d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1000ef8d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x4012a6
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x3c]
add eax, edi
cmp dword [eax], 0x4550
jne 0x4013a2
mov ebx, dword [ebp + 0x10]
lea esi, [eax + 0x78]
lea eax, [edi + ebx]
push esi
push eax
push edi
call fcn.00401253
add esp, 0xc
test eax, eax
je 0x4013a2
mov esi, dword [esi]
add esi, edi
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4013a2
cmp ecx, ebx
jae 0x4013a2
mov eax, dword [esi + 0x1c]
mov ebx, dword [esi + 0x24]
and dword [ebp - 4], 0
add eax, edi
add ebx, edi
cmp dword [esi + 0x18], 0
mov dword [ebp - 0xc], eax
lea eax, [ecx + edi]
jbe 0x4013a2
mov dword [ebp + 8], eax
mov dword [ebp - 8], ebx
push dword [ebp + 8]
mov eax, dword [ebp + 0x10]
add eax, edi
push eax
push edi
call fcn.0040126e
add esp, 0xc
test al, al
je 0x40138b
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [ebp + 0x10]
lea edx, [eax - 0x64]
cmp ecx, edx
jae 0x40138b
push dword [ebp - 8]
add eax, edi
push eax
push edi
call fcn.0040128a
add esp, 0xc
test al, al
je 0x40138b
mov eax, dword [ebp - 8]
movzx eax, word [eax]
mov ecx, dword [ebp - 0xc]
lea eax, [ecx + eax*4]
push eax
mov eax, dword [ebp + 0x10]
add eax, edi
push eax
push edi
call fcn.0040126e
add esp, 0xc
test al, al
je 0x40138b
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push 0
add eax, edi
push 0xffffffffffffffff
push eax
call fcn.0040103f
add esp, 0xc
cmp eax, dword [ebp + 0xc]
je 0x4013a9
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add dword [ebp - 8], 2
add dword [ebp + 8], 4
cmp eax, dword [esi + 0x18]
jb 0x40131a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp + 0x14], 0
mov eax, dword [ebp - 4]
movzx eax, word [ebx + eax*2]
je 0x4013be
inc eax
push eax
push edi
call dword [ebp + 0x14]
jmp 0x4013a4
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax*4]
add eax, edi
jmp 0x4013a4
Function at 0x40158d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi]
push edi
test ecx, ecx
jne 0x401637
mov eax, dword [ebp + 8]
ror dword [eax + 4], 1
mov cl, byte [eax + 4]
mov edi, dword [eax]
mov dl, byte [edi]
add cl, dl
mov byte [eax + 4], dl
movzx ecx, cl
inc edi
mov dword [eax], edi
mov dword [esi + 0x20004], ecx
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x20004]
shl edx, 8
movzx ecx, cl
add edx, ecx
mov dword [esi + 0x20004], edx
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x20004]
movzx ecx, cl
shl edx, 8
add edx, ecx
mov dword [esi + 0x20004], edx
mov edi, dword [eax]
ror dword [eax + 4], 1
mov cl, byte [eax + 4]
mov dl, byte [edi]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov eax, dword [esi + 0x20004]
movzx ecx, cl
shl eax, 8
add eax, ecx
or dword [esi], 0xffffffff
mov dword [esi + 0x20004], eax
jmp 0x4016c6
mov eax, dword [esi + 4]
add ecx, eax
xor ecx, eax
mov eax, dword [ebp + 8]
mov ebx, 0xff000000
test ebx, ecx
jne 0x401684
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x20004]
shl dword [esi + 4], 8
shl dword [esi], 8
shl edx, 8
movzx ecx, cl
add edx, ecx
mov dword [esi + 0x20004], edx
mov ecx, dword [esi + 4]
mov edx, dword [esi]
add edx, ecx
xor edx, ecx
test ebx, edx
je 0x40164a
mov edx, 0x10000
jmp 0x4016c2
movzx ecx, word [esi + 4]
mov edi, edx
sub edi, ecx
shl edi, 8
mov dword [esi], edi
ror dword [eax + 4], 1
mov edi, dword [eax]
mov bl, byte [edi]
mov cl, byte [eax + 4]
add cl, bl
inc edi
mov dword [eax], edi
mov byte [eax + 4], bl
mov edi, dword [esi + 0x20004]
movzx ecx, cl
shl edi, 8
add edi, ecx
shl dword [esi + 4], 8
mov dword [esi + 0x20004], edi
cmp dword [esi], edx
jb 0x40168b
mov ecx, dword [esi + 8]
mov eax, dword [esi]
xor edx, edx
inc ecx
div ecx
mov ebx, dword [esi + 4]
xor edx, edx
mov ecx, esi
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x20004]
sub eax, ebx
div dword [ebp + 8]
push eax
call fcn.004010eb
movzx edi, ax
mov eax, 0x4000
cmp di, ax
jae 0x401721
push edi
mov ecx, esi
call fcn.0040111d
imul eax, dword [ebp + 8]
add eax, ebx
mov dword [esi + 4], eax
movzx eax, di
mov eax, dword [esi + eax*4 + 0x10004]
imul eax, dword [ebp + 8]
push edi
mov ecx, esi
mov dword [esi], eax
call fcn.00401464
mov ax, di
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x40173a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi]
push edi
test ecx, ecx
jne 0x4017e4
mov eax, dword [ebp + 8]
ror dword [eax + 4], 1
mov cl, byte [eax + 4]
mov edi, dword [eax]
mov dl, byte [edi]
add cl, dl
mov byte [eax + 4], dl
movzx ecx, cl
inc edi
mov dword [eax], edi
mov dword [esi + 0x804], ecx
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x804]
shl edx, 8
movzx ecx, cl
add edx, ecx
mov dword [esi + 0x804], edx
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x804]
movzx ecx, cl
shl edx, 8
add edx, ecx
mov dword [esi + 0x804], edx
mov edi, dword [eax]
ror dword [eax + 4], 1
mov cl, byte [eax + 4]
mov dl, byte [edi]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov eax, dword [esi + 0x804]
movzx ecx, cl
shl eax, 8
add eax, ecx
or dword [esi], 0xffffffff
mov dword [esi + 0x804], eax
jmp 0x401873
mov eax, dword [esi + 4]
add ecx, eax
xor ecx, eax
mov eax, dword [ebp + 8]
mov ebx, 0xff000000
test ebx, ecx
jne 0x401831
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x804]
shl dword [esi + 4], 8
shl dword [esi], 8
shl edx, 8
movzx ecx, cl
add edx, ecx
mov dword [esi + 0x804], edx
mov ecx, dword [esi + 4]
mov edx, dword [esi]
add edx, ecx
xor edx, ecx
test ebx, edx
je 0x4017f7
mov edx, 0x10000
jmp 0x40186f
movzx ecx, word [esi + 4]
mov edi, edx
sub edi, ecx
shl edi, 8
mov dword [esi], edi
ror dword [eax + 4], 1
mov edi, dword [eax]
mov bl, byte [edi]
mov cl, byte [eax + 4]
add cl, bl
inc edi
mov dword [eax], edi
mov byte [eax + 4], bl
mov edi, dword [esi + 0x804]
movzx ecx, cl
shl edi, 8
add edi, ecx
shl dword [esi + 4], 8
mov dword [esi + 0x804], edi
cmp dword [esi], edx
jb 0x401838
mov ecx, dword [esi + 8]
mov eax, dword [esi]
xor edx, edx
inc ecx
div ecx
mov ebx, dword [esi + 4]
xor edx, edx
mov ecx, esi
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x804]
sub eax, ebx
div dword [ebp + 8]
push eax
call fcn.0040113d
movzx edi, ax
mov eax, 0x100
cmp di, ax
jae 0x4018ce
push edi
mov ecx, esi
call fcn.0040116f
imul eax, dword [ebp + 8]
add eax, ebx
mov dword [esi + 4], eax
movzx eax, di
mov eax, dword [esi + eax*4 + 0x404]
imul eax, dword [ebp + 8]
push edi
mov ecx, esi
mov dword [esi], eax
call fcn.004014cf
mov ax, di
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x4018e7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi]
push edi
test ecx, ecx
jne 0x401991
mov eax, dword [ebp + 8]
ror dword [eax + 4], 1
mov cl, byte [eax + 4]
mov edi, dword [eax]
mov dl, byte [edi]
add cl, dl
mov byte [eax + 4], dl
movzx ecx, cl
inc edi
mov dword [eax], edi
mov dword [esi + 0x80c], ecx
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x80c]
shl edx, 8
movzx ecx, cl
add edx, ecx
mov dword [esi + 0x80c], edx
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x80c]
movzx ecx, cl
shl edx, 8
add edx, ecx
mov dword [esi + 0x80c], edx
mov edi, dword [eax]
ror dword [eax + 4], 1
mov cl, byte [eax + 4]
mov dl, byte [edi]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov eax, dword [esi + 0x80c]
movzx ecx, cl
shl eax, 8
add eax, ecx
or dword [esi], 0xffffffff
mov dword [esi + 0x80c], eax
jmp 0x401a20
mov eax, dword [esi + 4]
add ecx, eax
xor ecx, eax
mov eax, dword [ebp + 8]
mov ebx, 0xff000000
test ebx, ecx
jne 0x4019de
ror dword [eax + 4], 1
mov edi, dword [eax]
mov dl, byte [edi]
mov cl, byte [eax + 4]
add cl, dl
mov byte [eax + 4], dl
inc edi
mov dword [eax], edi
mov edx, dword [esi + 0x80c]
shl dword [esi + 4], 8
shl dword [esi], 8
shl edx, 8
movzx ecx, cl
add edx, ecx
mov dword [esi + 0x80c], edx
mov ecx, dword [esi + 4]
mov edx, dword [esi]
add edx, ecx
xor edx, ecx
test ebx, edx
je 0x4019a4
mov edx, 0x10000
jmp 0x401a1c
movzx ecx, word [esi + 4]
mov edi, edx
sub edi, ecx
shl edi, 8
mov dword [esi], edi
ror dword [eax + 4], 1
mov edi, dword [eax]
mov bl, byte [edi]
mov cl, byte [eax + 4]
add cl, bl
inc edi
mov dword [eax], edi
mov byte [eax + 4], bl
mov edi, dword [esi + 0x80c]
movzx ecx, cl
shl edi, 8
add edi, ecx
shl dword [esi + 4], 8
mov dword [esi + 0x80c], edi
cmp dword [esi], edx
jb 0x4019e5
mov ecx, dword [esi + 8]
mov eax, dword [esi]
xor edx, edx
inc ecx
div ecx
mov ebx, dword [esi + 4]
xor edx, edx
mov ecx, esi
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x80c]
sub eax, ebx
div dword [ebp + 8]
push eax
call fcn.0040118f
movzx edi, ax
mov eax, 0x101
cmp di, ax
jae 0x401a7b
push edi
mov ecx, esi
call fcn.004011c1
imul eax, dword [ebp + 8]
add eax, ebx
mov dword [esi + 4], eax
movzx eax, di
mov eax, dword [esi + eax*4 + 0x408]
imul eax, dword [ebp + 8]
push edi
mov ecx, esi
mov dword [esi], eax
call fcn.0040153a
mov ax, di
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x404560
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 0x404640
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x404640
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x4045aa
mov ecx, 0x1505
xor edi, edi
nop
movzx edx, byte [ebx + edi]
test edx, edx
je 0x4045b1
inc edi
mov esi, ecx
shl esi, 5
add esi, ecx
add esi, edx
mov ecx, esi
cmp ebp, edi
jne 0x404590
jmp 0x4045b3
mov esi, 0x1505
jmp 0x4045b3
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov edi, dword [ecx + 0x20]
mov ebx, edi
sub ebx, 1
jb 0x404640
and ebx, esi
mov eax, edi
xor eax, 1
mov edx, edi
and edx, 0xfffffffe
add edx, edx
sub edx, eax
mov dword [esp + 8], edx
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
jmp 0x4045e4
inc ebx
dec edi
je 0x40463e
mov eax, ebx
and eax, dword [esp + 8]
mov edx, dword [esp + 4]
mov ebp, dword [edx + eax*4]
cmp ebp, 0xffffffff
je 0x40463e
mov eax, dword [ecx + 8]
cmp dword [eax + ebp*4], esi
jne 0x4045e0
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + ebp*4]
mov dword [esp], eax
push eax
call fcn.0040cb00
mov ecx, dword [esp + 0x24]
add esp, 4
cmp eax, dword [esp + 0x28]
jne 0x4045e0
push dword [esp + 0x28]
push dword [esp + 4]
push dword [esp + 0x2c]
call fcn.0040cb20
mov ecx, dword [esp + 0x2c]
add esp, 0xc
test eax, eax
jne 0x4045e0
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + ebp*4]
jmp 0x404640
xor eax, eax
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret