Function at 0x402440
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, 0xffffffff
test ecx, ecx
je 0x40254c
mov esi, edx
test edx, edx
je 0x40254c
mov dword [esp], ecx
cmp dword [esp + 0x30], 0
je 0x40254c
push esi
call fcn.00408770
add esp, 4
test eax, eax
je 0x40249a
mov ecx, 0x1505
xor edi, edi
movzx edx, byte [esi + edi]
test edx, edx
je 0x4024a1
mov ebp, ecx
shl ebp, 5
add ebp, ecx
add ebp, edx
inc edi
mov ecx, ebp
cmp eax, edi
jne 0x402480
jmp 0x4024a3
mov ebp, 0x1505
jmp 0x4024a3
mov ebp, ecx
mov dword [esp + 4], esi
mov ecx, dword [esp]
mov edx, dword [ecx + 0x20]
lea ebx, [edx - 1]
mov dword [esp + 0x10], edx
sub edx, 1
mov dword [esp + 0x14], edx
jae 0x402554
mov edi, 0xffffffff
mov eax, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x1c]
jb 0x40250e
call fcn.00402670
mov ecx, eax
mov eax, 0xffffffff
test ecx, ecx
mov ecx, dword [esp + 4]
jne 0x40254c
push ecx
call fcn.00408770
add esp, 4
mov dword [esp + 0x18], eax
mov ecx, dword [esp]
mov eax, dword [ecx + 0x20]
lea edx, [eax - 1]
mov dword [esp + 0x10], eax
sub eax, 1
mov dword [esp + 0x14], eax
jae 0x4025e0
mov edi, 0xffffffff
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 0x18]
mov esi, dword [esp + 4]
mov dword [eax + edx*4], esi
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x18]
mov dword [eax + edi*4], edx
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx + 0x18]
mov esi, dword [esp + 0x30]
mov dword [eax + edx*4], esi
mov eax, dword [ecx + 0x14]
mov edx, dword [ecx + 0x18]
mov dword [eax + edx*4], edi
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0x18]
mov dword [eax + edx*4], ebp
inc dword [ecx + 0x18]
mov eax, dword [ecx]
mov dword [esi], eax
xor eax, eax
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 8], eax
and ebx, ebp
mov eax, dword [ecx + 4]
mov dword [esp + 0xc], eax
xor esi, esi
jmp 0x402585
mov eax, esi
and eax, 1
xor esi, 1
lea esi, [esi + eax*2]
cmp esi, dword [esp + 0x10]
jae 0x4024c1
lea edi, [esi + ebx]
and edi, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov eax, dword [eax + edi*4]
cmp eax, 0xffffffff
je 0x4024c6
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebp
jne 0x402570
mov ecx, dword [ecx + 0xc]
mov edi, dword [ecx + eax*4]
push edi
call fcn.00408770
mov ecx, dword [esp + 4]
add esp, 4
cmp eax, dword [esp + 8]
jne 0x402570
push dword [esp + 8]
push edi
push dword [esp + 0xc]
call fcn.00408790
mov ecx, dword [esp + 0xc]
add esp, 0xc
test eax, eax
jne 0x402570
mov eax, 0xffffffff
jmp 0x40254c
and edx, ebp
mov eax, dword [ecx + 4]
mov dword [esp + 0xc], eax
xor ebx, ebx
mov dword [esp + 8], edx
jmp 0x402619
mov eax, ebx
and eax, 1
xor ebx, 1
lea ebx, [ebx + eax*2]
cmp ebx, dword [esp + 0x10]
mov edx, dword [esp + 8]
jae 0x402509
lea edi, [ebx + edx]
and edi, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov eax, dword [eax + edi*4]
cmp eax, 0xffffffff
je 0x40250e
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebp
jne 0x402600
mov ecx, dword [ecx + 0xc]
mov esi, dword [ecx + eax*4]
push esi
call fcn.00408770
mov ecx, dword [esp + 4]
add esp, 4
cmp eax, dword [esp + 0x18]
jne 0x402600
push dword [esp + 0x18]
push esi
push dword [esp + 0xc]
call fcn.00408790
mov ecx, dword [esp + 0xc]
add esp, 0xc
test eax, eax
jne 0x402600
jmp 0x40250e