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

Disassembly:
mov eax, 0x314
call fcn.100feb80
mov eax, dword [0x1016fb90]
xor eax, esp
mov dword [esp + 0x310], eax
cmp dword [esp + 0x330], 0x100000
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 + 0x320]
push esi
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x340]
mov esi, 8
push edi
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x54], ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x44], eax
mov edi, 0x40
mov dword [esp + 0x40], 0x28
mov dword [esp + 0x3c], esi
mov byte [esp + 0x12], 1
jb 0x1005131d
push 0xa9
push str.ssl_s3_cbc.c
push str.assertion_failed:_data_plus_mac_plus_padding_size___1024__1024
call fcn.1005dc80
add esp, 0xc
push ebp
call fcn.1008b780
push eax
call fcn.10056bc0
add esp, 8
cmp eax, 0x2a0
jg 0x100513e1
je 0x100513b2
cmp eax, 4
je 0x10051376
cmp eax, 0x40
jne 0x100513ee
lea ecx, [esp + 0x78]
push ecx
call fcn.100f01d0
add esp, 4
test eax, eax
jle 0x100519e9
mov dword [esp + 0x20], 0x10051050
mov dword [esp + 0x14], 0x1007dcc0
mov eax, 0x14
jmp 0x10051493
lea edx, [esp + 0x78]
push edx
call fcn.100f1f80
add esp, 4
test eax, eax
jle 0x100519e9
mov dword [esp + 0x20], 0x10050fd0
mov dword [esp + 0x14], 0x1007c550
mov eax, 0x10
mov dword [esp + 0x40], 0x30
mov byte [esp + 0x12], 0
jmp 0x10051493
lea eax, [esp + 0x78]
push eax
call fcn.1007a6b0
add esp, 4
test eax, eax
jle 0x100519e9
mov dword [esp + 0x20], 0x100510f0
mov dword [esp + 0x14], 0x1007b8d0
mov eax, 0x20
jmp 0x10051493
sub eax, 0x2a1
je 0x1005145d
dec eax
je 0x10051444
dec eax
je 0x10051418
push 0xe7
push str.ssl_s3_cbc.c
push str.assertion_failed:_0
call fcn.1005dc80
add esp, 0xc
test ebx, ebx
je 0x100519e9
mov dword [ebx], 0
jmp 0x100519e9
lea ecx, [esp + 0x78]
push ecx
call fcn.1007a650
add esp, 4
test eax, eax
jle 0x100519e9
mov dword [esp + 0x20], 0x100510f0
mov dword [esp + 0x14], 0x1007b8d0
mov eax, 0x1c
jmp 0x10051493
lea edx, [esp + 0x78]
push edx
call fcn.10079960
add esp, 4
test eax, eax
jle 0x100519e9
mov eax, edi
jmp 0x10051477
lea eax, [esp + 0x78]
push eax
call fcn.100798c0
add esp, 4
test eax, eax
jle 0x100519e9
mov eax, 0x30
mov esi, 0x10
mov dword [esp + 0x3c], esi
lea edi, [esi + 0x70]
mov dword [esp + 0x14], 0x1007a630
mov dword [esp + 0x20], 0x100511e0
mov cl, byte [esp + 0x34c]
mov ebp, 0xd
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], ebp
test cl, cl
je 0x100514be
mov edx, dword [esp + 0x348]
mov ebx, dword [esp + 0x40]
lea ebp, [ebx + edx + 0xb]
mov dword [esp + 0x34], ebp
mov edx, dword [esp + 0x340]
xor ebx, ebx
test cl, cl
sete bl
mov ecx, ebp
sub ecx, eax
lea eax, [ecx + esi]
add eax, edi
lea eax, [eax + edx - 1]
xor edx, edx
div edi
add ecx, dword [esp + 0x33c]
xor edx, edx
lea ebx, [ebx*4 + 2]
mov dword [esp + 0x2c], ebx
mov ebp, eax
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, ecx
div edi
mov dword [esp + 0x48], edx
xor edx, edx
mov dword [esp + 0x6c], eax
lea eax, [ecx + esi]
div edi
xor edx, edx
cmp byte [esp + 0x34c], dl
setne dl
add edx, ebx
mov dword [esp + 0x64], eax
cmp ebp, edx
jbe 0x10051535
sub ebp, ebx
mov eax, ebp
imul eax, edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], eax
cmp byte [esp + 0x34c], 0
lea ebx, [ecx*8]
jne 0x100515c5
push edi
lea eax, [esp + 0x1a4]
push 0
push eax
lea ebx, [ebx + edi*8]
call fcn.100fefe0
mov ebp, dword [esp + 0x354]
add esp, 0xc
cmp ebp, 0x80
jbe 0x10051582
push 0x14f
push str.ssl_s3_cbc.c
push str.assertion_failed:_mac_secret_length___sizeof_hmac_pad_
call fcn.1005dc80
add esp, 0xc
mov ecx, dword [esp + 0x44]
push ebp
push ecx
lea edx, [esp + 0x1a8]
push edx
call fcn.100febb0
add esp, 0xc
xor eax, eax
test edi, edi
je 0x100515ad
mov edi, edi
xor byte [esp + eax + 0x1a0], 0x36
inc eax
cmp eax, edi
jb 0x100515a0
mov ebp, dword [esp + 0x14]
lea eax, [esp + 0x1a0]
push eax
lea ecx, [esp + 0x7c]
push ecx
call ebp
add esp, 8
jmp 0x100515c9
mov ebp, dword [esp + 0x14]
cmp byte [esp + 0x12], 0
je 0x1005160a
lea edx, [esi - 4]
push edx
lea eax, [esp + 0x154]
push 0
push eax
call fcn.100fefe0
lea esi, [esp + esi + 0x15c]
mov ecx, ebx
mov edx, ebx
shr ecx, 0x18
shr edx, 0x10
mov eax, ebx
add esp, 0xc
shr eax, 8
mov byte [esi - 4], cl
mov byte [esi - 3], dl
mov byte [esi - 2], al
mov byte [esi - 1], bl
jmp 0x1005163f
push esi
lea ecx, [esp + 0x154]
push 0
push ecx
call fcn.100fefe0
lea esi, [esp + esi + 0x15c]
mov edx, ebx
mov eax, ebx
shr edx, 0x18
shr eax, 0x10
mov ecx, ebx
add esp, 0xc
shr ecx, 8
mov byte [esi - 5], dl
mov byte [esi - 6], al
mov byte [esi - 7], cl
mov byte [esi - 8], bl
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x10051760
cmp byte [esp + 0x34c], 0
je 0x100516e3
mov esi, dword [esp + 0x34]
cmp esi, edi
jbe 0x100519e9
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0x78]
push ebp
push edx
sub esi, edi
call ebx
push esi
add ebp, edi
lea eax, [esp + 0x22c]
push ebp
push eax
call fcn.100febb0
mov edx, dword [esp + 0x44]
mov ecx, edi
sub ecx, esi
push ecx
push edx
lea eax, [esp + esi + 0x23c]
push eax
call fcn.100febb0
lea ecx, [esp + 0x240]
push ecx
lea edx, [esp + 0x9c]
push edx
call ebx
mov eax, dword [esp + 0x50]
xor edx, edx
div edi
add esp, 0x28
dec eax
cmp eax, 1
jbe 0x10051760
mov ebp, dword [esp + 0x30]
sub ebp, esi
add ebp, edi
lea esi, [eax - 1]
lea eax, [esp + 0x78]
push ebp
push eax
call ebx
add esp, 8
add ebp, edi
dec esi
jne 0x100516d1
jmp 0x10051760
mov eax, dword [esp + 0x38]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov esi, dword [esp + 0x30]
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.100febb0
lea edx, [esp + 0x22c]
push edx
lea eax, [esp + 0x88]
push eax
call ebp
xor edx, edx
mov eax, ebx
div edi
add esp, 0x14
cmp eax, 1
jbe 0x10051760
lea esi, [esi + edi - 0xd]
lea ebx, [eax - 1]
jmp 0x10051750
lea ecx, [esp + 0x78]
push esi
push ecx
call ebp
add esp, 8
add esi, edi
dec ebx
jne 0x10051750
push 0x40
lea edx, [esp + 0x164]
push 0
push edx
call fcn.100fefe0
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
add eax, ecx
add esp, 0xc
mov dword [esp + 0x24], ecx
mov dword [esp + 0x74], eax
cmp ecx, eax
ja 0x10051948
mov edi, edi
mov ecx, dword [esp + 0x24]
mov eax, ecx
xor eax, dword [esp + 0x6c]
xor esi, esi
lea edx, [eax - 1]
not eax
shr eax, 0x1f
shr edx, 0x1f
and dl, al
mov eax, ecx
xor eax, dword [esp + 0x64]
neg dl
lea ebx, [eax - 1]
shr ebx, 0x1f
not eax
shr eax, 0x1f
and bl, al
neg bl
mov byte [esp + 0x1e], dl
mov byte [esp + 0x13], bl
test edi, edi
je 0x100518e3
mov ebp, dword [esp + 0x48]
movzx ecx, dl
mov dword [esp + 0x68], ecx
lea ecx, [ebp + 1]
shr ecx, 0x1f
mov dword [esp + 0x60], ecx
mov cl, bl
not cl
or cl, dl
mov edx, dword [esp + 0x3c]
mov byte [esp + 0x1f], cl
mov eax, ebp
mov ecx, edi
sub ecx, edx
shr eax, 0x1f
neg ebp
sub edx, edi
lea edx, [esp + edx + 0x150]
mov dword [esp + 0x58], eax
mov dword [esp + 0x70], ecx
mov dword [esp + 0x2c], edx
jmp 0x10051824
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
mov byte [esp + 0x12], 0
cmp ecx, edx
jae 0x10051842
mov edx, dword [esp + 0x38]
mov cl, byte [edx + ecx]
mov byte [esp + 0x12], cl
jmp 0x1005185c
mov ebx, dword [esp + 0x340]
add ebx, edx
cmp ecx, ebx
jae 0x1005185c
mov ebx, dword [esp + 0x30]
sub ebx, edx
mov dl, byte [ebx + ecx]
mov byte [esp + 0x12], dl
mov ecx, esi
shr ecx, 0x1f
mov bl, cl
xor bl, al
mov edx, ebp
shr edx, 0x1f
xor dl, al
or dl, bl
xor dl, cl
dec dl
inc dword [esp + 0x28]
movzx eax, dl
mov edx, dword [esp + 0x48]
and eax, dword [esp + 0x68]
inc edx
mov ebx, esi
sub ebx, edx
mov dl, byte [esp + 0x60]
shr ebx, 0x1f
xor bl, dl
xor dl, cl
or bl, dl
xor bl, cl
dec bl
and bl, byte [esp + 0x1e]
mov cl, al
not cl
and cl, byte [esp + 0x12]
and al, 0x80
not bl
or cl, al
and bl, cl
and bl, byte [esp + 0x1f]
mov al, bl
mov bl, byte [esp + 0x13]
cmp esi, dword [esp + 0x70]
jb 0x100518ce
movzx ecx, bl
mov dl, cl
not dl
and dl, al
mov eax, dword [esp + 0x2c]
mov al, byte [eax]
and al, cl
or al, dl
inc dword [esp + 0x2c]
mov byte [esp + esi + 0x2a0], al
inc esi
inc ebp
cmp esi, edi
jb 0x10051820
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 + 0x30]
mov esi, dword [esp + 0x28]
add esp, 0x10
xor eax, eax
test esi, esi
je 0x10051935
jmp 0x10051920
mov dl, byte [esp + eax + 0x2a0]
and dl, bl
or byte [esp + eax + 0x160], dl
inc eax
cmp eax, esi
jb 0x10051920
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x74]
jbe 0x10051790
call fcn.1005ea20
mov esi, eax
test esi, esi
je 0x100519e0
mov eax, dword [esp + 0x4c]
push 0
push eax
call fcn.1008b780
add esp, 4
push eax
push esi
call fcn.1005ea60
add esp, 0xc
test eax, eax
jle 0x100519e0
cmp byte [esp + 0x34c], 0
je 0x10051a04
mov edi, dword [esp + 0x40]
push edi
lea ecx, [esp + 0x1a4]
push 0x5c
push ecx
call fcn.100fefe0
mov edx, dword [esp + 0x354]
mov eax, dword [esp + 0x50]
push edx
push eax
push esi
call fcn.1005ec10
add esp, 0x18
test eax, eax
jle 0x100519e0
push edi
lea ecx, [esp + 0x1a4]
push ecx
push esi
call fcn.1005ec10
add esp, 0xc
test eax, eax
jle 0x100519e0
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x164]
push eax
push esi
call fcn.1005ec10
add esp, 0xc
test eax, eax
jg 0x10051a4d
push esi
call fcn.1005ea40
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x320]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100fef11
add esp, 0x314
ret
xor eax, eax
test edi, edi
je 0x10051a1d
lea ebx, [ebx]
xor byte [esp + eax + 0x1a0], 0x6a
inc eax
cmp eax, edi
jb 0x10051a10
push edi
lea ecx, [esp + 0x1a4]
push ecx
push esi
call fcn.1005ec10
add esp, 0xc
test eax, eax
jle 0x100519e0
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x164]
push eax
push esi
call fcn.1005ec10
add esp, 0xc
test eax, eax
jle 0x100519e0
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0x5c]
push ecx
push edx
push esi
call fcn.1005ef00
add esp, 0xc
test eax, eax
je 0x10051a72
mov eax, dword [esp + 0x54]
test eax, eax
je 0x10051a72
mov ecx, dword [esp + 0x5c]
mov dword [eax], ecx
push esi
call fcn.1005ea40
add esp, 4
mov eax, 1
jmp 0x100519eb