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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x60]
cmp dword [esp + 0x68], 0x40
mov eax, dword [esp + 0x64]
lea edx, [ebx + 0x2a0]
lea esi, [ebx + 0x2e0]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], esi
je 0x4226d0
ja 0x422228
mov esi, dword [esp + 0x68]
mov ecx, 0x40
sub ecx, dword [esp + 0x68]
add edx, esi
mov dword [esp + 0x14], esi
mov esi, edx
cmp ecx, 4
jae 0x4226e0
test ecx, ecx
jne 0x422750
mov ebp, dword [esp + 0x1c]
mov edi, 0x5c5c5c5c
add ebp, dword [esp + 0x68]
cmp ecx, 4
jb 0x422728
lea esi, [ebp + 4]
mov dword [ebp], 0x5c5c5c5c
and esi, 0xfffffffc
mov dword [ebp + ecx - 4], 0x5c5c5c5c
sub ebp, esi
add ecx, ebp
and ecx, 0xfffffffc
cmp ecx, 4
jb 0x422735
mov edx, dword [esp + 0x14]
and ecx, 0xfffffffc
xor ebp, ebp
mov dword [esi + ebp], edi
add ebp, 4
cmp ebp, ecx
jb 0x42220e
mov dword [esp + 0x14], edx
jmp 0x422735
mov edx, dword [esp + 0x68]
lea esi, [esp + 0x20]
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edx
call fcn.00423ca0
mov dword [esp + 0x14], 0x20
mov eax, esi
mov dword [ebx + 0x2c0], 0x36363636
mov dword [ebx + 0x2c4], 0x36363636
mov dword [ebx + 0x2c8], 0x36363636
mov dword [ebx + 0x2cc], 0x36363636
mov dword [ebx + 0x2d0], 0x36363636
mov dword [ebx + 0x2d4], 0x36363636
mov dword [ebx + 0x2d8], 0x36363636
mov dword [ebx + 0x2dc], 0x36363636
mov dword [ebx + 0x300], 0x5c5c5c5c
mov dword [ebx + 0x304], 0x5c5c5c5c
mov dword [ebx + 0x308], 0x5c5c5c5c
mov dword [ebx + 0x30c], 0x5c5c5c5c
mov dword [ebx + 0x310], 0x5c5c5c5c
mov dword [ebx + 0x314], 0x5c5c5c5c
mov dword [ebx + 0x318], 0x5c5c5c5c
mov dword [ebx + 0x31c], 0x5c5c5c5c
lea ecx, [eax + 4]
lea esi, [ebx + 0x2e4]
cmp dword [esp + 0x18], ecx
mov edi, dword [esp + 0x14]
setae cl
cmp eax, esi
setae dl
mov esi, edx
or ecx, esi
cmp edi, 3
setg dl
test cl, dl
je 0x422770
test al, 3
jne 0x422770
test edi, edi
mov esi, 1
cmovg esi, edi
mov edi, dword [eax]
xor edi, 0x36363636
mov ecx, esi
mov dword [ebx + 0x2a0], edi
mov edi, dword [eax]
shr ecx, 2
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2e0], edi
cmp ecx, 1
je 0x422590
mov edi, dword [eax + 4]
xor edi, 0x36363636
mov dword [ebx + 0x2a4], edi
mov edi, dword [eax + 4]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2e4], edi
cmp ecx, 2
je 0x422590
mov edi, dword [eax + 8]
xor edi, 0x36363636
mov dword [ebx + 0x2a8], edi
mov edi, dword [eax + 8]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2e8], edi
cmp ecx, 3
je 0x422590
mov edi, dword [eax + 0xc]
xor edi, 0x36363636
mov dword [ebx + 0x2ac], edi
mov edi, dword [eax + 0xc]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2ec], edi
cmp ecx, 4
je 0x422590
mov edi, dword [eax + 0x10]
xor edi, 0x36363636
mov dword [ebx + 0x2b0], edi
mov edi, dword [eax + 0x10]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2f0], edi
cmp ecx, 5
je 0x422590
mov edi, dword [eax + 0x14]
xor edi, 0x36363636
mov dword [ebx + 0x2b4], edi
mov edi, dword [eax + 0x14]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2f4], edi
cmp ecx, 6
je 0x422590
mov edi, dword [eax + 0x18]
xor edi, 0x36363636
mov dword [ebx + 0x2b8], edi
mov edi, dword [eax + 0x18]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2f8], edi
cmp ecx, 7
je 0x422590
mov edi, dword [eax + 0x1c]
xor edi, 0x36363636
mov dword [ebx + 0x2bc], edi
mov edi, dword [eax + 0x1c]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x2fc], edi
cmp ecx, 8
je 0x422590
mov edi, dword [eax + 0x20]
xor edi, 0x36363636
mov dword [ebx + 0x2c0], edi
mov edi, dword [eax + 0x20]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x300], edi
cmp ecx, 9
je 0x422590
mov edi, dword [eax + 0x24]
xor edi, 0x36363636
mov dword [ebx + 0x2c4], edi
mov edi, dword [eax + 0x24]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x304], edi
cmp ecx, 0xa
je 0x422590
mov edi, dword [eax + 0x28]
xor edi, 0x36363636
mov dword [ebx + 0x2c8], edi
mov edi, dword [eax + 0x28]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x308], edi
cmp ecx, 0xb
je 0x422590
mov edi, dword [eax + 0x2c]
xor edi, 0x36363636
mov dword [ebx + 0x2cc], edi
mov edi, dword [eax + 0x2c]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x30c], edi
cmp ecx, 0xc
je 0x422590
mov edi, dword [eax + 0x30]
xor edi, 0x36363636
mov dword [ebx + 0x2d0], edi
mov edi, dword [eax + 0x30]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x310], edi
cmp ecx, 0xd
je 0x422590
mov edi, dword [eax + 0x34]
xor edi, 0x36363636
mov dword [ebx + 0x2d4], edi
mov edi, dword [eax + 0x34]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x314], edi
cmp ecx, 0xe
je 0x422590
mov edi, dword [eax + 0x38]
xor edi, 0x36363636
mov dword [ebx + 0x2d8], edi
mov edi, dword [eax + 0x38]
xor edi, 0x5c5c5c5c
mov dword [ebx + 0x318], edi
cmp ecx, 0x10
jne 0x422590
mov edx, dword [eax + 0x3c]
xor edx, 0x36363636
mov dword [ebx + 0x2dc], edx
mov eax, dword [eax + 0x3c]
xor eax, 0x5c5c5c5c
mov dword [ebx + 0x31c], eax
jmp 0x42260c
mov ecx, esi
and ecx, 0xfffffffc
and esi, 3
je 0x42260c
lea edi, [eax + ecx]
movzx esi, byte [edi]
xor esi, 0x36
mov edx, esi
mov byte [ebx + ecx + 0x2a0], dl
movzx esi, byte [edi]
xor esi, 0x5c
mov edx, esi
lea esi, [ecx + 1]
mov byte [ebx + ecx + 0x2e0], dl
cmp esi, dword [esp + 0x14]
jge 0x42260c
lea ebp, [eax + esi]
movzx edi, byte [ebp]
xor edi, 0x36
mov edx, edi
mov byte [ebx + ecx + 0x2a1], dl
movzx edi, byte [ebp]
xor edi, 0x5c
mov edx, edi
mov byte [ebx + ecx + 0x2e1], dl
add ecx, 2
cmp dword [esp + 0x14], ecx
jle 0x42260c
add eax, ecx
movzx edx, byte [eax]
xor edx, 0x36
mov byte [ebx + ecx + 0x2a0], dl
movzx eax, byte [eax]
xor eax, 0x5c
mov byte [ebx + ecx + 0x2e0], al
mov dword [esp], ebx
lea ebp, [ebx + 0xa8]
lea edi, [ebx + 0x154]
mov esi, ebx
and edi, 0xfffffffc
call fcn.004238e0
mov eax, dword [esp + 0x18]
mov dword [esp], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
call fcn.00423960
mov dword [esp], ebp
call fcn.004238e0
mov eax, dword [esp + 0x1c]
mov dword [esp], ebp
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
call fcn.00423960
mov eax, dword [ebx]
lea ecx, [ebx + 0x150]
sub ecx, edi
mov dword [ebx + 0x150], eax
mov eax, dword [ebx + 0xa4]
sub esi, ecx
add ecx, 0xa8
shr ecx, 2
mov dword [ebx + 0x1f4], eax
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0x1fc]
lea ecx, [ebx + 0x1f8]
mov esi, ebp
and edi, 0xfffffffc
mov eax, dword [ebx + 0xa8]
sub ecx, edi
sub esi, ecx
add ecx, 0xa8
mov dword [ebx + 0x1f8], eax
mov eax, dword [ebx + 0x14c]
shr ecx, 2
mov dword [ebx + 0x29c], eax
rep movsd dword es:[edi], dword [esi]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], 0x40
jmp 0x4222ea
lea ebp, [edx + 4]
mov dword [edx], 0x36363636
and ebp, 0xfffffffc
mov dword [edx + ecx - 4], 0x36363636
sub esi, ebp
add esi, ecx
and esi, 0xfffffffc
cmp esi, 4
jb 0x4221ca
mov edx, dword [esp + 0x14]
and esi, 0xfffffffc
xor edi, edi
mov dword [ebp + edi], 0x36363636
add edi, 4
cmp edi, esi
jb 0x42270d
mov dword [esp + 0x14], edx
jmp 0x4221ca
test ecx, ecx
je 0x422735
mov byte [ebp], 0x5c
test cl, 2
jne 0x4227a8
mov edx, dword [esp + 0x68]
test edx, edx
jne 0x4222ea
jmp 0x42260c
mov byte [edx], 0x36
test cl, 2
je 0x4221ca
mov edi, 0x3636
mov word [edx + ecx - 2], di
jmp 0x4221ca
mov edx, dword [esp + 0x14]
xor ecx, ecx
mov esi, eax
lea esi, [esi]
nop
movzx eax, byte [esi + ecx]
xor eax, 0x36
mov byte [ebx + ecx + 0x2a0], al
movzx eax, byte [esi + ecx]
xor eax, 0x5c
mov byte [ebx + ecx + 0x2e0], al
add ecx, 1
cmp edx, ecx
jg 0x422780
jmp 0x42260c
mov esi, 0x5c5c
mov word [ebp + ecx - 2], si
jmp 0x422735