Function at 0x408cd0
Capabilities:
Authenticate hmac

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx]
push ebx
push esi
mov esi, eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [eax]
mov dword [ebp - 0x1c], edi
xor edi, edi
mov dword [edx], edi
mov dword [ebp - 0x18], ecx
mov dword [eax], edi
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x28], eax
cmp dword [esi + 0x24], eax
jne 0x408cff
mov dword [esi + 0x24], edi
mov edx, dword [esi + 0x24]
mov ebx, eax
sub ebx, edx
mov dword [ebp - 0x24], edx
cmp ecx, ebx
jbe 0x408d15
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], edi
jmp 0x408d21
add edx, ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], 1
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], edi
mov edi, dword [esi + 0x48]
mov dword [ebp - 8], edx
mov dword [ebp - 4], ebx
test edi, edi
je 0x408da0
cmp edi, 0x112
jae 0x408da0
mov edx, dword [esi + 0x38]
mov eax, dword [ebp - 0x24]
mov ebx, dword [esi + 0x14]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x14]
mov ecx, edi
sub edx, eax
cmp edx, ecx
jae 0x408d58
mov ecx, edx
cmp dword [esi + 0x30], 0
jne 0x408d6e
mov edx, dword [esi + 0xc]
sub edx, dword [esi + 0x2c]
cmp edx, ecx
ja 0x408d6e
mov edx, dword [esi + 0xc]
mov dword [esi + 0x30], edx
add dword [esi + 0x2c], ecx
sub edi, ecx
mov dword [esi + 0x48], edi
test ecx, ecx
je 0x408d97
lea ebx, [ebx]
cmp eax, dword [ebp - 0x10]
sbb edx, edx
and edx, dword [ebp - 0x28]
sub edx, dword [ebp - 0x10]
add edx, eax
mov dl, byte [edx + ebx]
mov byte [eax + ebx], dl
inc eax
dec ecx
jne 0x408d80
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 4]
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
cmp dword [esi + 0x48], 0x112
jne 0x408e26
cmp dword [esi + 0x20], 0
jne 0x408dc1
mov ecx, dword [ebp + 0x18]
mov dword [ecx], 1
xor ebx, ebx
cmp dword [esi + 0x20], ebx
setne bl
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
add dword [eax], ecx
mov eax, dword [ebp - 0x24]
mov edi, dword [esi + 0x24]
mov edx, dword [esi + 0x14]
add dword [ebp + 0x10], ecx
sub dword [ebp - 0x1c], ecx
sub edi, eax
add edx, eax
mov eax, dword [ebp + 8]
push edi
push edx
push eax
call fcn.00416d10
mov eax, dword [ebp + 0xc]
add dword [ebp + 8], edi
sub dword [ebp - 0x18], edi
add dword [eax], edi
add esp, 0xc
test ebx, ebx
jne 0x409098
test edi, edi
je 0x4090a1
cmp dword [ebp - 0x18], ebx
je 0x4090a1
mov ecx, dword [ebp - 0x18]
xor edi, edi
jmp 0x408cf1
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 4]
xor ecx, ecx
cmp dword [esi + 0x4c], ecx
je 0x408e9b
cmp ebx, ecx
jbe 0x408e56
mov eax, dword [esi + 0x58]
cmp eax, 5
jae 0x408e50
mov cl, byte [edx]
mov byte [eax + esi + 0x5c], cl
mov eax, 1
add dword [esi + 0x58], eax
add dword [ebp - 0xc], eax
add edx, eax
sub ebx, eax
jne 0x408e31
mov dword [ebp - 8], edx
mov dword [ebp - 4], ebx
cmp dword [esi + 0x58], 5
jb 0x409062
cmp byte [esi + 0x5c], 0
jne 0x40903e
movzx eax, byte [esi + 0x5d]
movzx ecx, byte [esi + 0x5e]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi + 0x5f]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi + 0x60]
shl eax, 8
or eax, ecx
xor ecx, ecx
mov dword [esi + 0x20], eax
mov dword [esi + 0x1c], 0xffffffff
mov dword [esi + 0x4c], ecx
mov dword [esi + 0x58], ecx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
cmp dword [esi + 0x24], eax
jb 0x408ece
mov eax, dword [esi + 0x48]
cmp eax, ecx
jne 0x408eb6
cmp dword [esi + 0x20], ecx
je 0x409015
cmp dword [ebp - 0x20], ecx
je 0x409025
cmp eax, ecx
jne 0x409035
mov dword [ebp - 0x10], 1
cmp dword [esi + 0x50], ecx
je 0x408f1f
mov ecx, dword [esi + 4]
add ecx, dword [esi]
mov edi, dword [esi + 0x10]
mov eax, 0x300
shl eax, cl
add eax, 0x736
je 0x408f06
mov ecx, eax
mov eax, 0x400
movzx ebx, ax
mov eax, ebx
shl ebx, 0x10
or eax, ebx
mov ebx, dword [ebp - 4]
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, 1
mov dword [esi + 0x44], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x38], eax
xor eax, eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x50], eax
mov edi, dword [esi + 0x58]
test edi, edi
jne 0x408f89
cmp ebx, 0x14
jb 0x408f36
cmp dword [ebp - 0x10], edi
jne 0x408f36
lea eax, [ebx + edx - 0x14]
jmp 0x408f5f
push edx
mov eax, ebx
mov ecx, esi
call fcn.004086f0
add esp, 4
test eax, eax
je 0x409048
cmp dword [ebp - 0x10], 0
je 0x408f5a
cmp eax, 2
jne 0x409035
mov eax, dword [ebp - 8]
mov edx, eax
mov ecx, dword [ebp - 0x14]
push eax
push ecx
mov dword [esi + 0x18], edx
call fcn.004085f0
test eax, eax
jne 0x40903e
mov ecx, dword [ebp - 8]
mov eax, dword [esi + 0x18]
sub eax, ecx
add dword [ebp - 0xc], eax
add ecx, eax
sub dword [ebp - 4], eax
mov dword [ebp - 8], ecx
jmp 0x409003
xor ebx, ebx
cmp edi, 0x14
jae 0x408fa3
cmp ebx, dword [ebp - 4]
jae 0x408fa3
mov al, byte [ebx + edx]
mov byte [esi + edi + 0x5c], al
inc edi
inc ebx
cmp edi, 0x14
jb 0x408f90
mov dword [esi + 0x58], edi
cmp edi, 0x14
jb 0x408fb1
cmp dword [ebp - 0x10], 0
je 0x408fd8
lea eax, [esi + 0x5c]
push eax
mov eax, edi
mov ecx, esi
call fcn.004086f0
add esp, 4
test eax, eax
je 0x409072
cmp dword [ebp - 0x10], 0
je 0x408fd8
cmp eax, 2
jne 0x409085
mov ecx, dword [ebp - 0x14]
lea eax, [esi + 0x5c]
push eax
push ecx
mov dword [esi + 0x18], eax
call fcn.004085f0
test eax, eax
jne 0x40903e
mov edx, dword [esi + 0x18]
sub edx, edi
sub edx, esi
lea ebx, [ebx + edx - 0x5c]
add dword [ebp - 0xc], ebx
add dword [ebp - 8], ebx
sub dword [ebp - 4], ebx
mov dword [esi + 0x58], eax
cmp dword [esi + 0x48], 0x112
jne 0x408e20
jmp 0x408db2
mov edx, dword [ebp + 0x18]
mov dword [edx], 4
xor ebx, ebx
jmp 0x408dc9
mov eax, dword [ebp + 0x18]
mov dword [eax], 2
xor ebx, ebx
jmp 0x408dc9
mov ecx, dword [ebp + 0x18]
mov dword [ecx], 2
mov ebx, 1
jmp 0x408dc9
mov edi, dword [ebp - 4]
mov edx, dword [ebp - 8]
push edi
jmp 0x472268
mov eax, dword [ebp + 0x18]
mov dword [eax], 3
xor ebx, ebx
jmp 0x408dc9
mov edx, dword [ebp + 0x18]
add dword [ebp - 0xc], ebx
mov dword [edx], 3
xor ebx, ebx
jmp 0x408dc9
mov eax, dword [ebp + 0x18]
mov dword [eax], 2
mov ebx, 1
jmp 0x408dc9
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret