Function at 0x590690
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov eax, dword [ebp + 8]
push ebx
push esi
sub eax, 0
push edi
je 0x590953
mov ebx, dword [ebp + 0x10]
dec eax
je 0x59080e
cmp ebx, 0x80
jbe 0x5906f4
lea eax, [ebp - 0x390]
push eax
call fcn.0058ebc0
mov ecx, dword [ebp + 0xc]
push ebx
lea edx, [ebp - 0x390]
push ecx
push edx
call fcn.0058eca0
lea eax, [ebp - 0x100]
lea ecx, [ebp - 0x390]
push eax
push ecx
call fcn.0058ed60
add esp, 0x18
mov ebx, 0x40
jmp 0x59071f
mov esi, dword [ebp + 0xc]
lea edx, [ebp - 0x100]
cmp edx, esi
je 0x590717
mov ecx, ebx
lea edi, [ebp - 0x100]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp ebx, 0x80
jae 0x59073d
mov ecx, 0x80
xor eax, eax
sub ecx, ebx
lea edi, [ebp + ebx - 0x100]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor eax, eax
mov cl, byte [ebp + eax - 0x100]
mov dl, cl
xor cl, 0x5c
xor dl, 0x36
mov byte [ebp + eax - 0x80], cl
mov byte [ebp + eax - 0x410], dl
inc eax
cmp eax, 0x80
jb 0x59073f
lea eax, [ebp - 0x390]
push eax
call fcn.0058ebc0
lea ecx, [ebp - 0x410]
push 0x80
lea edx, [ebp - 0x390]
push ecx
push edx
call fcn.0058eca0
lea eax, [ebp - 0x248]
push eax
call fcn.0058ebc0
lea ecx, [ebp - 0x80]
push 0x80
lea edx, [ebp - 0x248]
push ecx
push edx
call fcn.0058eca0
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push eax
lea edx, [ebp - 0x390]
push ecx
push edx
call fcn.0058eca0
mov eax, dword [ebp + 0x1c]
add esp, 0x2c
test eax, eax
je 0x5907d8
mov ecx, dword [ebp + 0x20]
lea edx, [ebp - 0x390]
push ecx
push eax
push edx
call fcn.0058eca0
add esp, 0xc
mov esi, dword [ebp + 0x24]
lea eax, [ebp - 0x390]
push esi
push eax
call fcn.0058ed60
push 0x40
lea ecx, [ebp - 0x248]
push esi
push ecx
call fcn.0058eca0
lea edx, [ebp - 0x248]
push esi
push edx
call fcn.0058ed60
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 0x40
jbe 0x59084a
lea eax, [ebp - 0x250]
push eax
call fcn.00588840
mov ecx, dword [ebp + 0xc]
push ebx
lea edx, [ebp - 0x250]
push ecx
push edx
call fcn.005888c0
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x250]
push eax
push ecx
call fcn.00588970
add esp, 0x18
mov ebx, 0x20
jmp 0x59086c
mov esi, dword [ebp + 0xc]
lea edx, [ebp - 0x40]
cmp edx, esi
je 0x590867
mov ecx, ebx
lea edi, [ebp - 0x40]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp ebx, 0x40
jae 0x590887
mov ecx, 0x40
xor eax, eax
sub ecx, ebx
lea edi, [ebp + ebx - 0x40]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor eax, eax
mov cl, byte [ebp + eax - 0x40]
mov dl, cl
xor cl, 0x5c
xor dl, 0x36
mov byte [ebp + eax - 0xc0], cl
mov byte [ebp + eax - 0x3d0], dl
inc eax
cmp eax, 0x40
jb 0x590889
lea eax, [ebp - 0x250]
push eax
call fcn.00588840
lea ecx, [ebp - 0x3d0]
push 0x40
lea edx, [ebp - 0x250]
push ecx
push edx
call fcn.005888c0
lea eax, [ebp - 0x1a8]
push eax
call fcn.00588840
lea ecx, [ebp - 0xc0]
push 0x40
lea edx, [ebp - 0x1a8]
push ecx
push edx
call fcn.005888c0
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push eax
lea edx, [ebp - 0x250]
push ecx
push edx
call fcn.005888c0
mov eax, dword [ebp + 0x1c]
add esp, 0x2c
test eax, eax
je 0x59091d
mov ecx, dword [ebp + 0x20]
lea edx, [ebp - 0x250]
push ecx
push eax
push edx
call fcn.005888c0
add esp, 0xc
mov esi, dword [ebp + 0x24]
lea eax, [ebp - 0x250]
push esi
push eax
call fcn.00588970
push 0x20
lea ecx, [ebp - 0x1a8]
push esi
push ecx
call fcn.005888c0
lea edx, [ebp - 0x1a8]
push esi
push edx
call fcn.00588970
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x10]
cmp ebx, 0x40
jbe 0x590992
lea eax, [ebp - 0x1b8]
push eax
call fcn.005844c0
mov ecx, dword [ebp + 0xc]
push ebx
lea edx, [ebp - 0x1b8]
push ecx
push edx
call fcn.00584500
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x1b8]
push eax
push ecx
call fcn.005845d0
add esp, 0x18
mov ebx, 0x14
jmp 0x5909b4
mov esi, dword [ebp + 0xc]
lea edx, [ebp - 0x40]
cmp edx, esi
je 0x5909af
mov ecx, ebx
lea edi, [ebp - 0x40]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp ebx, 0x40
jae 0x5909cf
mov ecx, 0x40
xor eax, eax
sub ecx, ebx
lea edi, [ebp + ebx - 0x40]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor eax, eax
mov cl, byte [ebp + eax - 0x40]
mov dl, cl
xor cl, 0x5c
xor dl, 0x36
mov byte [ebp + eax - 0x3d0], cl
mov byte [ebp + eax - 0xc0], dl
inc eax
cmp eax, 0x40
jb 0x5909d1
lea eax, [ebp - 0x1b8]
push eax
call fcn.005844c0
lea ecx, [ebp - 0xc0]
push 0x40
lea edx, [ebp - 0x1b8]
push ecx
push edx
call fcn.00584500
lea eax, [ebp - 0x15c]
push eax
call fcn.005844c0
lea ecx, [ebp - 0x3d0]
push 0x40
lea edx, [ebp - 0x15c]
push ecx
push edx
call fcn.00584500
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push eax
lea edx, [ebp - 0x1b8]
push ecx
push edx
call fcn.00584500
mov eax, dword [ebp + 0x1c]
add esp, 0x2c
test eax, eax
je 0x590a65
mov ecx, dword [ebp + 0x20]
lea edx, [ebp - 0x1b8]
push ecx
push eax
push edx
call fcn.00584500
add esp, 0xc
mov esi, dword [ebp + 0x24]
lea eax, [ebp - 0x1b8]
push esi
push eax
call fcn.005845d0
push 0x14
lea ecx, [ebp - 0x15c]
push esi
push ecx
call fcn.00584500
lea edx, [ebp - 0x15c]
push esi
push edx
call fcn.005845d0
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret