Function at 0x403770
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, 0xffffffff
cmp dword [esp + 0x30], 0
je 0x4038e7
mov esi, dword [esp + 0x34]
test esi, esi
je 0x4038e7
mov ebp, dword [esp + 0x38]
test ebp, ebp
je 0x4038e7
push esi
call fcn.00409960
add esp, 4
test eax, eax
je 0x4037da
mov ecx, 0x1505
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esi + edi]
test edx, edx
je 0x4037e1
mov ebx, ecx
shl ebx, 5
add ebx, ecx
add ebx, edx
inc edi
mov ecx, ebx
cmp eax, edi
jne 0x4037c0
jmp 0x4037e3
mov ebx, 0x1505
jmp 0x4037e3
mov ebx, ecx
mov dword [esp], eax
mov ecx, dword [esp + 0x30]
mov edi, dword [ecx + 0x20]
test edi, edi
je 0x40387f
mov eax, edi
not eax
and eax, 1
mov esi, edi
and esi, 0xfffffffe
sub esi, eax
and esi, ebx
lea eax, [edi - 1]
mov dword [esp + 4], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0xc], eax
mov ebp, esi
not ebp
inc esi
jmp 0x403825
dec ebp
inc esi
dec edi
je 0x403886
mov eax, dword [esp + 4]
or eax, ebp
add eax, esi
mov edx, dword [esp + 0xc]
mov edx, dword [edx + eax*4]
cmp edx, 0xffffffff
je 0x40388b
mov eax, dword [ecx + 8]
cmp dword [eax + edx*4], ebx
jne 0x403820
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + edx*4]
mov dword [esp + 8], eax
push eax
call fcn.00409960
mov ecx, dword [esp + 0x34]
add esp, 4
cmp eax, dword [esp]
jne 0x403820
push dword [esp]
push dword [esp + 0xc]
push dword [esp + 0x3c]
call fcn.00409980
mov ecx, dword [esp + 0x3c]
add esp, 0xc
test eax, eax
jne 0x403820
mov eax, 0xffffffff
jmp 0x4038e7
mov eax, 0xffffffff
jmp 0x40388f
mov eax, 0xffffffff
mov ebp, dword [esp + 0x38]
mov edx, dword [ecx + 0x18]
cmp edx, dword [ecx + 0x1c]
jae 0x4038d3
mov esi, dword [ecx + 0xc]
mov edi, ecx
mov edx, dword [ecx + 0x18]
mov ecx, dword [esp + 0x34]
mov dword [esi + edx*4], ecx
mov ecx, dword [edi + 4]
mov edx, dword [edi + 0x18]
mov dword [ecx + eax*4], edx
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4], ebp
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x18]
mov dword [ecx + edx*4], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x18]
mov dword [eax + ecx*4], ebx
inc dword [edi + 0x18]
mov eax, dword [edi]
mov dword [ebp], eax
xor eax, eax
jmp 0x4038e7
call fcn.004039d0
mov ecx, eax
mov eax, 0xffffffff
test ecx, ecx
mov ecx, dword [esp + 0x34]
je 0x4038ef
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push ecx
call fcn.00409960
add esp, 4
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x4039b8
mov eax, edx
not eax
and eax, 1
mov esi, edx
and esi, 0xfffffffe
sub esi, eax
and esi, ebx
lea eax, [edx - 1]
mov dword [esp], eax
mov eax, dword [ecx + 4]
mov dword [esp + 8], eax
mov ebp, esi
not ebp
mov dword [esp + 0x14], esi
lea edi, [esi + 1]
xor eax, eax
jmp 0x40394e
mov eax, dword [esp + 4]
inc eax
dec ebp
inc edi
mov edx, dword [esp + 0xc]
dec edx
je 0x4039c2
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
mov esi, dword [esp]
or esi, ebp
lea eax, [edi + esi]
mov edx, dword [esp + 8]
mov edx, dword [edx + eax*4]
cmp edx, 0xffffffff
je 0x4039c7
mov eax, dword [ecx + 8]
cmp dword [eax + edx*4], ebx
jne 0x403940
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + edx*4]
mov dword [esp + 0x18], eax
push eax
call fcn.00409960
mov ecx, dword [esp + 0x34]
add esp, 4
cmp eax, dword [esp + 0x10]
jne 0x403940
push dword [esp + 0x10]
push dword [esp + 0x1c]
push dword [esp + 0x3c]
call fcn.00409980
mov ecx, dword [esp + 0x3c]
add esp, 0xc
test eax, eax
jne 0x403940
mov eax, dword [esp + 4]
add eax, dword [esp + 0x14]
add eax, esi
inc eax
jmp 0x4039c7
mov eax, 0xffffffff
jmp 0x403897
mov eax, 0xffffffff
mov ebp, dword [esp + 0x38]
jmp 0x403897