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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
mov eax, dword [0x8d5f40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x320], eax
mov eax, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x2ec], eax
mov eax, dword [ebp + 0x18]
push 0x40
mov dword [ebp - 0x2f0], eax
mov eax, dword [ebp + 0x24]
pop ebx
mov dword [ebp - 0x300], eax
xor eax, eax
push 8
inc eax
mov dword [ebp - 0x31c], ecx
cmp dword [ebp + 0x20], 0x100000
pop edi
mov dword [ebp - 0x324], esi
mov dword [ebp - 0x2fc], 0x28
mov dword [ebp - 0x2cc], edi
mov dword [ebp - 0x2f8], eax
mov byte [ebp - 0x2ad], al
jae 0x5f841c
push ecx
call fcn.00538365
push eax
call fcn.00531d8c
pop ecx
pop ecx
sub eax, 4
je 0x5f851f
sub eax, 0x3c
je 0x5f84f7
sub eax, 0x260
je 0x5f84ce
sub eax, 1
je 0x5f8493
sub eax, 1
je 0x5f845d
sub eax, 1
je 0x5f842d
test esi, esi
je 0x5f841c
and dword [esi], 0
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006fedff
leave
ret
lea eax, [ebp - 0x2ac]
push eax
call fcn.00557876
pop ecx
test eax, eax
jle 0x5f841c
push 0x1c
mov dword [ebp - 0x2d4], 0x5f8cda
mov dword [ebp - 0x2c0], 0x557a6c
pop ecx
push 0x28
pop edx
jmp 0x5f855c
lea eax, [ebp - 0x2ac]
push eax
call fcn.00558e6a
pop ecx
test eax, eax
jle 0x5f841c
push 0x40
pop ecx
push 0x10
pop edi
mov dword [ebp - 0x2d4], 0x5f8d0e
mov dword [ebp - 0x2c0], 0x558f02
lea ebx, [ecx + 0x40]
mov dword [ebp - 0x2cc], edi
jmp 0x5f8455
lea eax, [ebp - 0x2ac]
push eax
call fcn.00558a95
pop ecx
test eax, eax
jle 0x5f841c
push 0x30
pop ecx
push 0x10
pop edi
mov dword [ebp - 0x2d4], 0x5f8d0e
mov eax, 0x558f02
lea ebx, [ecx + 0x50]
mov dword [ebp - 0x2cc], edi
push 0x28
pop edx
jmp 0x5f8556
lea eax, [ebp - 0x2ac]
push eax
call fcn.00557a14
pop ecx
test eax, eax
jle 0x5f841c
mov dword [ebp - 0x2d4], 0x5f8cda
mov eax, 0x557a6c
push 0x20
pop ecx
jmp 0x5f84c6
lea eax, [ebp - 0x2ac]
push eax
call fcn.00556496
pop ecx
test eax, eax
jle 0x5f841c
mov dword [ebp - 0x2d4], 0x5f8c59
mov eax, 0x5564d2
push 0x14
jmp 0x5f84f4
lea eax, [ebp - 0x2ac]
push eax
call fcn.0057ca23
pop ecx
test eax, eax
jle 0x5f841c
push 0x10
pop ecx
push 0x30
pop edx
mov dword [ebp - 0x2d4], 0x5f8be5
mov eax, 0x57ca58
mov dword [ebp - 0x2fc], edx
mov byte [ebp - 0x2ad], 0
mov dword [ebp - 0x2c0], eax
cmp byte [ebp + 0x2c], 0
push 0xd
pop esi
mov dword [ebp - 0x2c8], ecx
mov dword [ebp - 0x2f4], esi
je 0x5f8584
mov esi, dword [ebp + 0x28]
add esi, 0xb
add esi, edx
push 2
mov dword [ebp - 0x2f4], esi
pop eax
jmp 0x5f8591
lea eax, [ebx + 0xff]
xor edx, edx
add eax, ecx
div ebx
inc eax
sub esi, ecx
mov dword [ebp - 0x2d0], eax
mov eax, dword [ebp + 0x20]
xor edx, edx
dec eax
and dword [ebp - 0x2bc], 0
lea ecx, [esi + edi]
add esi, dword [ebp + 0x1c]
add ecx, ebx
add eax, ecx
xor ecx, ecx
div ebx
xor edx, edx
mov dword [ebp - 0x2b4], eax
mov eax, esi
div ebx
mov dword [ebp - 0x2e8], edx
xor edx, edx
mov dword [ebp - 0x304], eax
lea eax, [esi + edi]
div ebx
cmp byte [ebp + 0x2c], cl
mov edx, dword [ebp - 0x2b4]
setne cl
mov dword [ebp - 0x308], eax
add ecx, dword [ebp - 0x2d0]
mov dword [ebp - 0x2d8], ecx
mov ecx, edx
sub ecx, dword [ebp - 0x2d0]
mov eax, dword [ebp - 0x2d8]
cmp eax, edx
jae 0x5f8616
mov eax, ecx
imul eax, ebx
mov dword [ebp - 0x2bc], eax
mov eax, dword [ebp - 0x2d8]
cmp eax, edx
sbb eax, eax
and eax, ecx
mov dword [ebp - 0x2d8], eax
mov eax, esi
shl eax, 3
cmp byte [ebp + 0x2c], 0
mov dword [ebp - 0x2b8], eax
jne 0x5f869f
lea eax, [eax + ebx*8]
push ebx
mov dword [ebp - 0x2b8], eax
lea eax, [ebp - 0xd4]
push 0
push eax
call fcn.00718210
mov eax, dword [ebp + 0x28]
add esp, 0xc
cmp eax, 0x80
ja 0x5f841c
push eax
push dword [ebp - 0x300]
lea eax, [ebp - 0xd4]
push eax
call fcn.00717660
add esp, 0xc
xor eax, eax
xor byte [ebp + eax - 0xd4], 0x36
inc eax
cmp eax, ebx
jb 0x5f8672
mov esi, dword [ebp - 0x2c0]
lea eax, [ebp - 0xd4]
push eax
lea eax, [ebp - 0x2ac]
push eax
call esi
mov eax, dword [ebp - 0x2b8]
pop ecx
pop ecx
jmp 0x5f86a5
mov esi, dword [ebp - 0x2c0]
mov ecx, eax
shr ecx, 0x18
mov dword [ebp - 0x2e4], ecx
mov ecx, eax
shr ecx, 0x10
shr eax, 8
cmp byte [ebp - 0x2ad], 0
mov dword [ebp - 0x2e0], ecx
mov dword [ebp - 0x2b4], eax
je 0x5f8706
lea eax, [edi - 4]
push eax
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.00718210
mov eax, dword [ebp - 0x2e4]
mov byte [ebp + edi - 0x18], al
mov eax, dword [ebp - 0x2e0]
mov byte [ebp + edi - 0x17], al
mov eax, dword [ebp - 0x2b4]
mov byte [ebp + edi - 0x16], al
mov eax, dword [ebp - 0x2b8]
mov byte [ebp + edi - 0x15], al
jmp 0x5f873a
push edi
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.00718210
mov eax, dword [ebp - 0x2e4]
mov byte [ebp + edi - 0x19], al
mov eax, dword [ebp - 0x2e0]
mov byte [ebp + edi - 0x1a], al
mov eax, dword [ebp - 0x2b4]
mov byte [ebp + edi - 0x1b], al
mov eax, dword [ebp - 0x2b8]
mov byte [ebp + edi - 0x1c], al
add esp, 0xc
cmp dword [ebp - 0x2bc], 0
jbe 0x5f8882
cmp byte [ebp + 0x2c], 0
je 0x5f880a
mov eax, dword [ebp - 0x2f4]
cmp eax, ebx
jbe 0x5f841c
push dword [ebp - 0x2ec]
sub eax, ebx
mov dword [ebp - 0x2b8], eax
lea eax, [ebp - 0x2ac]
push eax
call esi
push dword [ebp - 0x2b8]
mov eax, dword [ebp - 0x2ec]
add eax, ebx
push eax
lea eax, [ebp - 0x154]
push eax
call fcn.00717660
mov eax, ebx
sub eax, dword [ebp - 0x2b8]
push eax
push dword [ebp - 0x2f0]
lea eax, [ebp - 0x154]
add eax, dword [ebp - 0x2b8]
push eax
call fcn.00717660
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x2ac]
push eax
call esi
mov eax, dword [ebp - 0x2bc]
xor edx, edx
div ebx
add esp, 0x28
dec eax
cmp eax, 1
jbe 0x5f8882
mov edi, dword [ebp - 0x2f0]
sub edi, dword [ebp - 0x2b8]
add edi, ebx
dec eax
mov dword [ebp - 0x2b4], eax
lea eax, [ebp - 0x2ac]
push edi
push eax
call esi
pop ecx
add edi, ebx
sub dword [ebp - 0x2b4], 1
pop ecx
jne 0x5f87f1
jmp 0x5f887c
mov esi, dword [ebp - 0x2ec]
lea edi, [ebp - 0x154]
lea eax, [ebx - 0xd]
push eax
lea eax, [ebp - 0x147]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x2f0]
push edi
push eax
call fcn.00717660
mov esi, dword [ebp - 0x2c0]
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x2ac]
push eax
call esi
mov eax, dword [ebp - 0x2bc]
xor edx, edx
div ebx
add esp, 0x14
cmp eax, 1
jbe 0x5f887c
add edi, 0xfffffff3
add edi, ebx
dec eax
mov dword [ebp - 0x2b4], eax
lea eax, [ebp - 0x2ac]
push edi
push eax
call esi
pop ecx
add edi, ebx
sub dword [ebp - 0x2b4], 1
pop ecx
jne 0x5f8865
mov edi, dword [ebp - 0x2cc]
push 0x40
lea eax, [ebp - 0x54]
push 0
push eax
call fcn.00718210
mov eax, dword [ebp - 0x2d0]
add esp, 0xc
mov ecx, dword [ebp - 0x2d8]
add eax, ecx
mov dword [ebp - 0x318], eax
cmp ecx, eax
ja 0x5f8ad5
mov eax, dword [ebp - 0x2e8]
neg dword [ebp - 0x2e8]
lea edx, [eax + 1]
shr eax, 0x1f
mov dword [ebp - 0x2b4], eax
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x310], eax
mov eax, ebx
sub eax, edi
mov dword [ebp - 0x30c], edx
mov dword [ebp - 0x314], eax
sub edi, ebx
lea eax, [ebp - 0x14]
add eax, edi
mov dword [ebp - 0x2cc], eax
mov eax, ecx
mov esi, dword [ebp - 0x2bc]
xor eax, dword [ebp - 0x304]
xor edi, edi
lea edx, [eax - 1]
not eax
shr eax, 0x1f
shr edx, 0x1f
and dl, al
mov eax, ecx
xor eax, dword [ebp - 0x308]
neg dl
mov dword [ebp - 0x2e0], edx
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and cl, al
neg cl
mov al, cl
mov dword [ebp - 0x2e4], ecx
not al
or al, dl
mov byte [ebp - 0x2c1], al
mov eax, dword [ebp - 0x2e8]
mov dword [ebp - 0x2d0], eax
mov eax, dword [ebp - 0x2cc]
mov dword [ebp - 0x2b8], eax
mov ecx, dword [ebp - 0x2f4]
mov byte [ebp - 0x2ad], 0
cmp esi, ecx
jae 0x5f896d
mov eax, dword [ebp - 0x2ec]
jmp 0x5f897e
mov eax, dword [ebp + 0x20]
add eax, ecx
cmp esi, eax
jae 0x5f8987
mov eax, dword [ebp - 0x2f0]
sub eax, ecx
mov al, byte [eax + esi]
mov byte [ebp - 0x2ad], al
mov ecx, dword [ebp - 0x2d0]
mov edx, edi
shr ecx, 0x1f
inc esi
xor cl, byte [ebp - 0x2b4]
shr edx, 0x1f
mov al, dl
xor al, byte [ebp - 0x2b4]
or cl, al
mov eax, dword [ebp - 0x2e0]
xor cl, dl
movzx eax, al
dec cl
movzx ecx, cl
and ecx, eax
mov dword [ebp - 0x2dc], ecx
not ecx
mov dword [ebp - 0x2bc], ecx
mov eax, dword [ebp - 0x2bc]
and al, byte [ebp - 0x2ad]
mov ecx, dword [ebp - 0x2dc]
and cl, 0x80
or cl, al
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x2dc], ecx
mov ecx, edi
sub ecx, dword [ebp - 0x30c]
shr ecx, 0x1f
xor cl, al
xor al, dl
or cl, al
xor cl, dl
mov edx, dword [ebp - 0x2dc]
dec cl
and cl, byte [ebp - 0x2e0]
not cl
and cl, byte [ebp - 0x2c1]
and dl, cl
cmp edi, dword [ebp - 0x314]
jb 0x5f8a4b
mov eax, dword [ebp - 0x2e4]
movzx eax, al
mov dword [ebp - 0x2dc], eax
not eax
mov dword [ebp - 0x2bc], eax
mov eax, dword [ebp - 0x2b8]
mov ecx, dword [ebp - 0x2dc]
and cl, byte [eax]
mov eax, dword [ebp - 0x2bc]
and dl, al
or dl, cl
mov byte [ebp + edi - 0x1d4], dl
inc edi
inc dword [ebp - 0x2d0]
inc dword [ebp - 0x2b8]
cmp edi, ebx
jb 0x5f8954
lea eax, [ebp - 0x1d4]
mov dword [ebp - 0x2bc], esi
mov esi, dword [ebp - 0x2c0]
push eax
lea eax, [ebp - 0x2ac]
push eax
call esi
lea eax, [ebp - 0x1d4]
push eax
lea eax, [ebp - 0x2ac]
push eax
call dword [ebp - 0x2d4]
mov edi, dword [ebp - 0x2c8]
add esp, 0x10
mov edx, dword [ebp - 0x2e4]
xor ecx, ecx
mov al, byte [ebp + ecx - 0x1d4]
and al, dl
or byte [ebp + ecx - 0x54], al
inc ecx
cmp ecx, edi
jb 0x5f8aa8
mov ecx, dword [ebp - 0x2d8]
inc ecx
mov dword [ebp - 0x2d8], ecx
cmp ecx, dword [ebp - 0x318]
jbe 0x5f88ee
jmp 0x5f8adb
mov edi, dword [ebp - 0x2c8]
call fcn.0055c727
mov esi, eax
test esi, esi
je 0x5f8b5a
push 0
push dword [ebp - 0x31c]
call fcn.00538365
pop ecx
push eax
push esi
call fcn.0055c3f6
add esp, 0xc
test eax, eax
jle 0x5f8b5a
cmp byte [ebp + 0x2c], 0
je 0x5f8b73
mov ebx, dword [ebp - 0x2fc]
lea eax, [ebp - 0xd4]
push ebx
push 0x5c
push eax
call fcn.00718210
push dword [ebp + 0x28]
push dword [ebp - 0x300]
push esi
call fcn.0055c577
add esp, 0x18
test eax, eax
jle 0x5f8b5a
push ebx
lea eax, [ebp - 0xd4]
push eax
push esi
call fcn.0055c577
add esp, 0xc
test eax, eax
jle 0x5f8b5a
push edi
lea eax, [ebp - 0x54]
push eax
push esi
call fcn.0055c577
add esp, 0xc
test eax, eax
jg 0x5f8b84
and dword [ebp - 0x2f8], 0
push esi
call fcn.0055c708
mov eax, dword [ebp - 0x2f8]
pop ecx
jmp 0x5f841e
xor eax, eax
xor byte [ebp + eax - 0xd4], 0x6a
inc eax
cmp eax, ebx
jb 0x5f8b75
jmp 0x5f8b33
lea eax, [ebp - 0x328]
push eax
push dword [ebp - 0x320]
push esi
call fcn.0055c2c2
add esp, 0xc
test eax, eax
je 0x5f8b61
mov ecx, dword [ebp - 0x324]
test ecx, ecx
je 0x5f8b61
mov eax, dword [ebp - 0x328]
mov dword [ecx], eax
jmp 0x5f8b61