Function at 0x51ec00
Capabilities:
Authenticate hmac
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x314
call fcn.004a72f0
mov eax, dword [0x595978]
xor eax, esp
mov dword [esp + 0x310], eax
mov eax, dword [esp + 0x31c]
mov ecx, dword [esp + 0x324]
mov edx, dword [esp + 0x328]
push ebx
mov ebx, dword [esp + 0x324]
push ebp
mov ebp, dword [esp + 0x338]
push esi
mov esi, dword [esp + 0x324]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x340]
push edi
mov dword [esp + 0x74], esi
mov dword [esp + 0x64], ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x4c], eax
mov edi, 0x40
mov dword [esp + 0x40], 0x28
mov dword [esp + 0x20], 8
cmp ebp, 0x100000
jb 0x51ec99
push str.data_plus_mac_plus_padding_size___10241024
push 0x1c4
push str.._ssl_s3_cbc.c
call fcn.004c7730
add esp, 0xc
push esi
call fcn.00540000
add esp, 4
cmp eax, 0x2a0
jg 0x51ed3a
je 0x51ed13
cmp eax, 4
je 0x51ece4
cmp eax, 0x40
jne 0x51ed47
lea ecx, [esp + 0x78]
push ecx
call fcn.004ec5c0
mov dword [esp + 0x2c], 0x51e9e0
mov dword [esp + 0x18], 0x4edc30
mov dword [esp + 0x1c], 0x14
jmp 0x51edd4
lea edx, [esp + 0x78]
push edx
call fcn.004f64a0
mov dword [esp + 0x2c], 0x51e960
mov dword [esp + 0x18], 0x4f60f0
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x44], 0x30
jmp 0x51edd4
lea eax, [esp + 0x78]
push eax
call fcn.004eddf0
mov dword [esp + 0x2c], 0x51ea80
mov dword [esp + 0x18], 0x4ef010
mov dword [esp + 0x1c], 0x20
jmp 0x51edd4
sub eax, 0x2a1
je 0x51eda5
dec eax
je 0x51ed95
dec eax
je 0x51ed71
push 0x556cb0
push 0x1f9
push str.._ssl_s3_cbc.c
call fcn.004c7730
add esp, 0xc
test ebx, ebx
je 0x51f2d1
mov dword [ebx], 0xffffffff
jmp 0x51f2d1
lea ecx, [esp + 0x78]
push ecx
call fcn.004edd90
mov dword [esp + 0x2c], 0x51ea80
mov dword [esp + 0x18], 0x4ef010
mov dword [esp + 0x1c], 0x1c
jmp 0x51edd4
lea edx, [esp + 0x78]
push edx
call fcn.004ef3b0
mov dword [esp + 0x1c], edi
jmp 0x51edb7
lea eax, [esp + 0x78]
push eax
call fcn.004ef310
mov dword [esp + 0x1c], 0x30
mov dword [esp + 0x24], 0x10
mov edi, 0x80
mov dword [esp + 0x18], 0x4f2330
mov dword [esp + 0x2c], 0x51eb70
mov al, byte [esp + 0x350]
add esp, 4
mov dword [esp + 0x30], 0xd
test al, al
je 0x51edfd
mov ecx, dword [esp + 0x348]
mov edx, dword [esp + 0x40]
lea ecx, [edx + ecx + 0xb]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
xor ebx, ebx
test al, al
sete bl
sub ecx, dword [esp + 0x18]
lea eax, [ecx + edx]
add eax, edi
xor edx, edx
lea eax, [eax + ebp - 1]
div edi
add ecx, dword [esp + 0x33c]
xor edx, edx
xor ebp, ebp
lea ebx, [ebx*4 + 2]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebp
mov esi, eax
mov eax, ecx
div edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
xor edx, edx
add eax, ecx
div edi
xor edx, edx
cmp byte [esp + 0x34c], dl
setne dl
add edx, ebx
mov dword [esp + 0x44], eax
cmp esi, edx
jbe 0x51ee70
sub esi, ebx
mov ebp, esi
mov dword [esp + 0x24], esi
imul ebp, edi
cmp byte [esp + 0x34c], 0
lea ebx, [ecx*8]
jne 0x51ef01
push edi
lea eax, [esp + 0x1a4]
push 0
push eax
lea ebx, [ebx + edi*8]
call fcn.004a6110
mov esi, dword [esp + 0x354]
add esp, 0xc
cmp esi, 0x80
jbe 0x51eec1
push str.mac_secret_length___sizeof_hmac_pad_
push 0x252
push str.._ssl_s3_cbc.c
call fcn.004c7730
add esp, 0xc
mov ecx, dword [esp + 0x4c]
push esi
push ecx
lea edx, [esp + 0x1a8]
push edx
call fcn.004a5720
add esp, 0xc
xor eax, eax
test edi, edi
je 0x51eeed
lea ecx, [ecx]
xor byte [esp + eax + 0x1a0], 0x36
inc eax
cmp eax, edi
jb 0x51eee0
lea eax, [esp + 0x1a0]
push eax
lea ecx, [esp + 0x7c]
push ecx
call dword [esp + 0x1c]
add esp, 8
mov esi, dword [esp + 0x20]
lea edx, [esi - 4]
push edx
lea eax, [esp + 0x154]
push 0
push eax
call fcn.004a6110
lea eax, [esp + esi + 0x15c]
mov ecx, ebx
shr ecx, 0x18
mov byte [eax - 4], cl
mov edx, ebx
mov ecx, ebx
shr edx, 0x10
shr ecx, 8
add esp, 0xc
mov byte [eax - 3], dl
mov byte [eax - 2], cl
mov byte [eax - 1], bl
test ebp, ebp
je 0x51f058
cmp byte [esp + 0x34c], 0
je 0x51efdc
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x7c]
push eax
sub esi, edi
call ebx
mov ecx, dword [esp + 0x3c]
push esi
add ecx, edi
push ecx
lea edx, [esp + 0x230]
push edx
call fcn.004a5720
mov ecx, dword [esp + 0x4c]
mov eax, edi
sub eax, esi
push eax
push ecx
lea edx, [esp + esi + 0x23c]
push edx
call fcn.004a5720
lea eax, [esp + 0x240]
push eax
lea ecx, [esp + 0x9c]
push ecx
call ebx
xor edx, edx
mov eax, ebp
div edi
add esp, 0x28
dec eax
cmp eax, 1
jbe 0x51f058
mov ebx, dword [esp + 0x38]
sub ebx, esi
add ebx, edi
lea esi, [eax - 1]
lea edx, [esp + 0x78]
push ebx
push edx
call dword [esp + 0x1c]
add esp, 8
add ebx, edi
dec esi
jne 0x51efc5
jmp 0x51f058
mov eax, dword [esp + 0x34]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x220], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x224], edx
mov dl, byte [eax + 0xc]
lea eax, [edi - 0xd]
push eax
mov dword [esp + 0x22c], ecx
lea ecx, [esp + 0x231]
push esi
push ecx
mov byte [esp + 0x238], dl
call fcn.004a5720
lea edx, [esp + 0x22c]
push edx
lea eax, [esp + 0x88]
push eax
call dword [esp + 0x28]
xor edx, edx
mov eax, ebp
div edi
add esp, 0x14
cmp eax, 1
jbe 0x51f058
lea esi, [esi + edi - 0xd]
lea ebx, [eax - 1]
lea ecx, [esp + 0x78]
push esi
push ecx
call dword [esp + 0x1c]
add esp, 8
add esi, edi
dec ebx
jne 0x51f046
push 0x40
lea edx, [esp + 0x164]
push 0
push edx
call fcn.004a6110
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
add eax, ecx
add esp, 0xc
mov dword [esp + 0x24], ecx
mov dword [esp + 0x70], eax
cmp ecx, eax
ja 0x51f1dd
movzx ecx, byte [esp + 0x48]
movzx edx, byte [esp + 0x44]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], edx
jmp 0x51f0a0
movzx eax, byte [esp + 0x24]
mov ebx, dword [esp + 0x48]
xor ebx, eax
xor eax, dword [esp + 0x44]
dec ebx
dec eax
sar eax, 0x1f
sar ebx, 0x1f
mov byte [esp + 0x13], al
test edi, edi
je 0x51f181
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x3c]
not al
mov byte [esp + 0x1f], al
or al, bl
mov byte [esp + 0x1e], al
mov eax, edi
sub eax, ecx
neg esi
sub ecx, edi
lea edx, [esp + ecx + 0x150]
mov dword [esp + 0x60], eax
mov dword [esp + 0x2c], edx
mov edi, edi
mov eax, dword [esp + 0x30]
xor dl, dl
cmp ebp, eax
jae 0x51f103
mov eax, dword [esp + 0x34]
mov dl, byte [eax + ebp]
jmp 0x51f119
mov ecx, dword [esp + 0x340]
add ecx, eax
cmp ebp, ecx
jae 0x51f119
mov edx, dword [esp + 0x38]
sub edx, eax
mov dl, byte [edx + ebp]
mov eax, esi
not eax
sar eax, 0x1f
and al, bl
mov cl, al
and cl, 0x80
not al
and al, dl
mov edx, dword [esp + 0x3c]
or al, cl
lea ecx, [esi - 1]
not ecx
sar ecx, 0x1f
and cl, bl
not cl
and al, cl
and al, byte [esp + 0x1e]
lea ecx, [esi + edx]
inc ebp
cmp ecx, dword [esp + 0x60]
jb 0x51f15f
mov dl, byte [esp + 0x1f]
and dl, al
mov eax, dword [esp + 0x2c]
mov al, byte [eax]
and al, byte [esp + 0x13]
or al, dl
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x3c]
inc dword [esp + 0x2c]
lea ecx, [esp + ecx + 0x2a0]
mov byte [ecx + esi], al
inc esi
lea eax, [esi + edx]
cmp eax, edi
jb 0x51f0f0
lea ecx, [esp + 0x2a0]
push ecx
lea edx, [esp + 0x7c]
push edx
call dword [esp + 0x1c]
lea eax, [esp + 0x2a8]
push eax
lea ecx, [esp + 0x84]
push ecx
call dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
add esp, 0x10
xor eax, eax
test ecx, ecx
je 0x51f1ca
mov dl, byte [esp + eax + 0x2a0]
and dl, byte [esp + 0x13]
inc eax
or byte [esp + eax + 0x15f], dl
cmp eax, ecx
jb 0x51f1b3
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x70]
jbe 0x51f0a0
lea eax, [esp + 0x50]
push eax
call fcn.004db370
mov ecx, dword [esp + 0x78]
push 0
push ecx
lea edx, [esp + 0x5c]
push edx
call fcn.004db470
add esp, 0x10
cmp byte [esp + 0x34c], 0
je 0x51f25f
mov esi, dword [esp + 0x40]
push esi
lea eax, [esp + 0x1a4]
push 0x5c
push eax
call fcn.004a6110
mov ecx, dword [esp + 0x354]
mov edx, dword [esp + 0x58]
push ecx
push edx
lea eax, [esp + 0x64]
push eax
call fcn.004db520
push esi
lea ecx, [esp + 0x1bc]
push ecx
lea edx, [esp + 0x70]
push edx
call fcn.004db520
mov eax, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x188]
push ecx
lea edx, [esp + 0x7c]
push edx
call fcn.004db520
add esp, 0x30
jmp 0x51f29f
xor eax, eax
test edi, edi
je 0x51f272
xor byte [esp + eax + 0x1a0], 0x6a
inc eax
cmp eax, edi
jb 0x51f265
push edi
lea eax, [esp + 0x1a4]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.004db520
mov edx, dword [esp + 0x24]
push edx
lea eax, [esp + 0x170]
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.004db520
add esp, 0x18
mov eax, dword [esp + 0x6c]
lea edx, [esp + 0x68]
push edx
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.004db620
mov eax, dword [esp + 0x70]
add esp, 0xc
test eax, eax
je 0x51f2c4
mov edx, dword [esp + 0x68]
mov dword [eax], edx
lea eax, [esp + 0x50]
push eax
call fcn.004db5b0
add esp, 4
mov ecx, dword [esp + 0x320]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0049cc86
add esp, 0x314
ret