Function at 0x404470
Capabilities:
Authenticate hmac
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [ebp + 0x24]
mov dl, byte [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
push edi
mov dword [esp + 0x20], 0x3fff
cmp eax, 0xffc3d44f
je 0x4044aa
cmp eax, 0xffc3d44e
je 0x4044aa
mov byte [esp + 0xd], 0
cmp eax, 0xffc3d44d
jne 0x4044af
mov byte [esp + 0xd], 1
mov ecx, dword [0x4a14b4]
test ecx, ecx
jne 0x4044c6
lea edi, [esp + 0x40]
mov dword [esp + 0x1c], edi
jmp 0x40456d
mov eax, dword [0x4a14b8]
mov edi, eax
imul edi, edi, 0x70
inc eax
add edi, ecx
mov dword [esp + 0x1c], edi
mov dword [0x4a14b8], eax
cmp eax, dword [0x49d32c]
jl 0x4044ee
mov dword [0x4a14b8], 0
mov al, byte [ebp + 0x18]
mov cl, byte [ebp + 0x20]
mov byte [edi], al
mov byte [edi + 5], cl
call dword [0x48d2e4]
mov edx, eax
sub edx, dword [0x4a32fc]
mov dword [0x4a14bc], eax
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
jns 0x40451c
fadd dword [0x497be0]
fdiv qword [0x497bd8]
mov dword [0x4a32fc], eax
fstp dword [edi + 8]
call dword [0x48d604]
mov esi, eax
test esi, esi
je 0x40455d
cmp esi, dword [0x4a14c0]
je 0x404557
mov ecx, dword [0x4a0a38]
push esi
lea eax, [edi + 0xc]
push eax
push 0x418
push ecx
call dword [0x48d570]
jmp 0x404564
mov byte [edi + 0xc], 0
jmp 0x404564
mov dword [edi + 0xc], 0x412f4e
mov dl, byte [ebp + 0x18]
mov dword [0x4a14c0], esi
cmp dl, 0xe7
jne 0x40458a
mov edx, dword [ebp + 0x14]
mov ax, word [edx + 4]
mov word [edi + 2], ax
mov byte [edi + 4], 0x55
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [edx + 0x64]
mov word [edi + 2], bx
cmp cl, 3
ja 0x40459b
xor ebx, ebx
mov dword [ebp + 0x1c], ebx
mov eax, dword [ebp + 8]
cmp eax, dword [0x4a0b6c]
jne 0x4045cf
mov al, byte [ebp + 0x28]
and al, 1
mov byte [esp + 0xf], al
jne 0x4046ff
cmp byte [ebp + 0x20], 0
movzx edx, dl
setne cl
dec cl
and cl, 0x80
mov byte [edx + 0x4a0a58], cl
jmp 0x4046ff
mov eax, dword [ebp + 0x28]
shr eax, 4
and al, 1
mov byte [esp + 0xf], al
test ebx, 0x100
jne 0x4046bd
push 0x90
call dword [0x48d5ec]
test al, 1
je 0x4046bd
movzx eax, byte [ebp + 0x18]
add eax, 0xfffffff4
cmp eax, 0x62
ja 0x4046bd
movzx ecx, byte [eax + 0x405f94]
jmp dword [ecx*4 + 0x405f64]
movzx esi, byte [ebp + 0x18]
mov edx, dword [0x4a14d8]
lea ecx, [esi + esi*8]
shl ecx, 5
cmp byte [ecx + edx + 4], 0
jne 0x4046ff
test byte [ebp + 0x28], 0x10
jne 0x4046ff
mov eax, dword [ebp + 0x20]
push eax
mov al, byte [ebp + 0x18]
call fcn.004073a0
add esp, 4
test al, al
je 0x4046ff
cmp byte [ebp + 0x20], 0
setne cl
dec cl
and cl, 0x80
mov byte [esi + 0x4a0a58], cl
cmp byte [esp + 0xd], 0
je 0x40470a
mov al, 0x69
jmp 0x404716
mov al, byte [esp + 0xf]
neg al
sbb al, al
and al, 0x41
add al, 0x20
cmp byte [0x4a0b58], 0
mov byte [edi + 4], al
je 0x40475c
mov al, byte [ebp + 0x18]
cmp al, 0x5b
je 0x40472d
cmp al, 0x5c
jne 0x40475c
cmp byte [ebp + 0x20], 0
jne 0x40475c
mov edx, dword [ebp + 0x18]
push 0
push 0x7fffffff
push 0x3fff
push edi
push ebx
push edx
xor bl, bl
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
call fcn.00406090
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [0x49f951], 0
je 0x404800
cmp byte [ebp + 0x18], 0x1b
jne 0x404800
cmp byte [ebp + 0x20], 0
jne 0x404800
push 0
push 0x491190
call dword [0x48d574]
test eax, eax
je 0x404800
push 0
push eax
call dword [0x48d600]
mov esi, eax
call dword [0x48d2b8]
cmp esi, eax
jne 0x404800
push 0xffc3d44d
push 0
push 0
push 0
push 0x1b
push 0
call fcn.0040e2a0
mov al, byte [0x4a0a35]
push 0xffc3d44d
shr al, 3
push 0
and al, 1
or al, 0xa4
push 0
movzx ecx, al
push 0
push ecx
push 1
call fcn.0040e2a0
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push 0
push 0x7fffffff
push 0x3fff
push edi
push ebx
push 0x1b
xor bl, bl
call fcn.00406090
add esp, 0x48
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, bx
lea edx, [eax + eax*8]
mov dword [esp + 0x30], eax
mov eax, dword [0x4a14dc]
shl edx, 5
mov cl, byte [eax + edx + 0x12]
add eax, edx
mov edx, dword [0x4a0b68]
mov byte [esp + 0x27], cl
cmp dword [ebp + 8], edx
jne 0x404832
test cl, cl
je 0x404832
mov cl, byte [ebp + 0x18]
mov esi, eax
jmp 0x404844
mov cl, byte [ebp + 0x18]
movzx eax, cl
lea esi, [eax + eax*8]
shl esi, 5
add esi, dword [0x4a14d8]
cmp byte [esp + 0xd], 0
mov dword [esp + 0x18], esi
je 0x404889
cmp dword [ebp + 0x24], 0xffc3d44e
jne 0x404878
cmp byte [ebp + 0x20], 0
je 0x404878
cmp dword [0x49f94c], esi
jne 0x404878
mov byte [esi + 0xc], 0
mov byte [esi + 0xf], 0
mov dword [0x49f94c], 0
mov ecx, dword [ebp + 0x20]
push 0
push 0x3fff
push edi
push ecx
jmp 0x405f3f
cmp byte [ebp + 0x20], 0
jne 0x40489c
mov eax, 0x3fff
mov byte [esi + 0x10], 0
mov word [esi + 6], ax
cmp dword [ebp + 8], edx
jne 0x404956
cmp byte [ebp + 0x20], 0
je 0x4049c5
cmp byte [0x49f955], 0
je 0x4048bd
cmp cl, 0x5b
je 0x4048ef
cmp byte [0x49f954], 0
je 0x4048cb
cmp cl, 0x5c
je 0x4048ef
cmp byte [0x49f953], 0
je 0x4048d9
cmp cl, 0xa4
je 0x4048ef
cmp byte [0x49f952], 0
je 0x4049c5
cmp cl, 0xa5
jne 0x4049c5
movzx eax, cl
add eax, 0xffffffa5
cmp eax, 0x4a
ja 0x40492a
movzx ecx, byte [eax + 0x40600c]
jmp dword [ecx*4 + 0x405ff8]
test byte [0x4a0a35], 3
jne 0x4049c5
movzx edx, byte [0x49d2f9]
push 0xffc3d44d
push 0
push 0
push 0
push edx
push 2
call fcn.0040e2a0
add esp, 0x18
jmp 0x4049c5
test cl, cl
jne 0x404988
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push 0
push 0x3fff
push edi
push eax
mov eax, dword [ebp + 8]
push 0
push ecx
mov ecx, dword [ebp + 0x14]
push edx
push eax
mov eax, ebx
call fcn.00406180
add esp, 0x20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp cl, 1
je 0x404992
cmp cl, 2
jne 0x4049c5
cmp dword [0x4a0bb0], 0
jne 0x405f27
push 0
push 0x491198
call dword [0x48d574]
test eax, eax
je 0x4049c5
push 0
push eax
call dword [0x48d600]
cmp eax, dword [0x4a2bbc]
je 0x405f27
mov ecx, dword [0x49f94c]
test ecx, ecx
je 0x4049fd
cmp ecx, esi
je 0x4049fd
mov dl, byte [ebp + 0x20]
test dl, dl
jne 0x404a00
mov eax, dword [ebp + 8]
cmp eax, dword [0x4a0b68]
jne 0x4049ef
xor eax, eax
cmp byte [esi + 4], al
sete al
jmp 0x4049f3
movzx eax, byte [ecx + 4]
test eax, eax
je 0x404a00
mov byte [ecx + 0x11], 1
jmp 0x404a00
mov dl, byte [ebp + 0x20]
cmp byte [esi + 8], 0
jne 0x404a10
cmp byte [esi + 9], 0
je 0x404878
mov byte [esp + 0x2b], 0
mov dword [esp + 0x10], 0x3fff
mov dword [esp + 0x3c], 0
test dl, dl
je 0x404a58
mov al, byte [esi + 0xc]
mov cl, byte [esi + 0xf]
mov byte [esp + 0x17], al
movzx eax, word [esi + 6]
mov byte [esp + 0x15], cl
mov ecx, 0x3fff
mov byte [esi + 0xf], 0
cmp ax, cx
je 0x404a56
mov dword [esp + 0x10], eax
mov byte [esp + 0x2b], 1
mov word [esi + 6], cx
test dl, dl
sete al
mov byte [esi + 0xc], al
mov eax, dword [0x4a0b68]
mov byte [esp + 0xd], 0
cmp dword [ebp + 8], eax
jne 0x404ae8
cmp byte [esi + 4], 0
je 0x404b08
mov ecx, dword [0x4a14d8]
cmp byte [ecx + 0xb64c], 0
jne 0x404a93
cmp byte [ecx + 0xb76c], 0
jne 0x404a93
xor eax, eax
jmp 0x404a98
mov eax, 1
cmp byte [ecx + 0xb88c], 0
mov byte [ecx + 0x132c], al
jne 0x404ab4
cmp byte [ecx + 0xb9ac], 0
jne 0x404ab4
xor eax, eax
jmp 0x404ab9
mov eax, 1
cmp byte [ecx + 0xb40c], 0
mov byte [ecx + 0x144c], al
jne 0x404adb
cmp byte [ecx + 0xb52c], 0
jne 0x404adb
xor eax, eax
mov byte [ecx + 0x120c], al
jmp 0x404b0e
mov eax, 1
mov byte [ecx + 0x120c], al
jmp 0x404b0e
test eax, eax
jne 0x404b08
push 1
call fcn.00410850
mov dl, byte [ebp + 0x20]
add esp, 4
mov byte [0x4a0a36], al
mov byte [0x4a0a35], al
mov byte [esp + 0xd], 1
mov ecx, dword [0x4a14d8]
mov eax, dword [esi]
test eax, eax
je 0x404b1e
cmp dword [eax], 7
mov byte [esp + 0xf], 1
je 0x404b23
mov byte [esp + 0xf], 0
mov al, byte [esi + 8]
test al, al
je 0x404cc1
test dl, dl
jne 0x404cc1
mov edx, dword [0x49f94c]
test edx, edx
je 0x404b4e
cmp byte [esi + 9], 0
je 0x404b4e
cmp esi, edx
jne 0x404cc1
cmp al, 1
jne 0x404b7a
cmp byte [esp + 0x27], 0
mov eax, dword [esp + 0x30]
jne 0x404b61
movzx eax, byte [ebp + 0x18]
mov ecx, dword [esp + 0x27]
push ecx
push eax
call int.00409590
add esp, 8
test al, al
je 0x404b7a
mov byte [esp + 0xe], 1
jmp 0x404b91
mov byte [esp + 0xe], 0
cmp esi, dword [0x49f94c]
je 0x404b91
mov dword [0x49f94c], esi
mov byte [esi + 0x11], 0
cmp byte [esi + 9], 0
je 0x404c41
cmp byte [esp + 0xd], 0
jne 0x404bb1
push 1
mov byte [esp + 0x11], 1
call fcn.00410850
add esp, 4
mov al, byte [esi + 4]
mov cl, byte [0x4a0a36]
test al, al
je 0x404bc2
not al
and cl, al
test cl, cl
jne 0x404bcc
cmp byte [esp + 0xe], cl
je 0x404c41
mov edx, dword [ebp + 8]
cmp edx, dword [0x4a0b68]
jne 0x404bf4
cmp byte [esp + 0x27], 0
je 0x404bf4
movzx eax, cl
mov ecx, dword [0x4a14d0]
shl eax, 8
add eax, dword [esp + 0x30]
movzx ecx, word [ecx + eax*2]
jmp 0x404c0a
movzx eax, byte [ebp + 0x18]
movzx edx, cl
mov ecx, dword [0x4a14cc]
mov eax, ebp
or al, 0x23
shr byte [0x813d0cb7], cl
insd dword es:[edi], dx
and byte [ecx], dh
test dword [ecx + 0x4b204a00], 0x89362c74
dec esi
push ds
sub dword [ebp + 0x20], 0x89f731
dec edx
and byte [ebx + 0x74], cl
sub al, 0x36
mov dword [esi + 0x1e], ecx
dec ebx
je 0x404c42
mov dword ss:[esi + 0x1e], ecx
and dword [ebx], 0xffffff8f
adc eax, 0x40c9c4e0
add ebx, 0x25
jmp [0x365e8000]
jae 0x404c44
invalid
retf
int 0x64
xor byte [edx + 0xb042dfe], ch
mov bl, 0xcb
xor eax, 0x30448a6e
pop dword [eax + eax*2 + 0x4e86492a]
or dword [eax], 0xffffffcf
mov dword [0x61fe8021], 0xf6206d04
and ch, byte [edi]
or dword [ebp - 0x20], esi
rcr byte [ebp + 0x4f], 0
jne 0x404c91
loopne 0x404c2c
pop esp
and eax, 0x1f75004f
xchg al, al
ja 0x404c8d
mov al, byte [edi + 0x78002218]
push edi
push ebx
jge 0x404c6a
imul byte [edi - 0x69a8b900]
shr ecx, 1
je 0x404c89
out dx, eax
invalid
jp 0x404c13
push 0x8801ffd
push ebp
pop ds
or byte [eax], 0x55
imul eax, dword [ecx], 0xffffffcb
dec ebp
cwde
invalid
mov dh, ch
sbb esp, dword [eax]
les edx, [esp + 0x16]
cmp byte [ecx + 0x69], 0x84
js 0x404d37
add al, 0x34
and edi, dword [ebx]
xor eax, 0x197d5c
jne 0x404c6a
loop 0x404d58
sub byte [0x5ed4604c], bl
mov eax, dword [0x4b7948]
or byte [ebp + 0x7e900008], dl
push cs
and byte [esi + 0x3f], dh
sub al, bh
or edx, dword [eax + 0x36086408]
jmp 0x171043e3
add byte [edx], al
mov eax, dword [ecx + 0x645e5]
cmp byte [ebp + 0x10], 0
jne 0xb04de0
cmp edi, dword [ebp + 0x4c]
std
dec eax
xor dword [0xc485c70a], 0xfffffffd
sbb ecx, dword [ebx]
add dword [eax], eax
add al, 4
add byte [esp + eax], al
add byte [esi], ch
xchg esp, eax
add byte [ecx + eax], dh
push 0xdfc3dc45
dec esp
add byte [eax - 0x80], ch
bound eax, qword [0x296a1248]
mov byte [edi], 0xf
add al, ch
xchg ecx, eax
add byte [eax], ah
stosd dword es:[edi], eax
or eax, 0x5b04dc
ret
dec ebp
add al, byte [0x6ca0148b]
or ecx, dword [ebp + 0x10]
push 0xfffd6c00
invalid
mov eax, dword [ebp + 0x20]
push 0xffffffffffffff80
push 0xc8001bff
xchg ebp, eax
shr byte [esp], 0xd5
jg 0x405f0e
inc esi
push cs
inc eax
or cl, byte [esi + 0xd]
push esp
mov edx, dword [esp + ebx]
pop dword [0x3c4f9315]
push edx
invalid