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

Disassembly:
mov eax, 0x320
call fcn.004bcc80
mov eax, dword [0x5c30d8]
xor eax, esp
mov dword [esp + 0x31c], eax
mov eax, dword [esp + 0x328]
mov ecx, dword [esp + 0x330]
mov edx, dword [esp + 0x334]
push ebx
mov ebx, dword [esp + 0x330]
push ebp
mov ebp, dword [esp + 0x344]
push esi
push edi
mov edi, dword [esp + 0x334]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x350]
mov dword [esp + 0x64], edi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x44], eax
mov esi, 0x40
mov dword [esp + 0x40], 0x28
mov dword [esp + 0x18], 8
mov byte [esp + 0x13], 1
cmp ebp, 0x100000
jb 0x4160ae
push str.data_plus_mac_plus_padding_size___10241024
push 0x1d7
push str.._ssl_s3_cbc.c
call fcn.00426230
add esp, 0xc
push edi
call fcn.0046ba60
push eax
call fcn.004021d0
add esp, 8
cmp eax, 0x2a0
jg 0x416163
je 0x416139
cmp eax, 4
je 0x416102
cmp eax, 0x40
jne 0x416174
lea ecx, [esp + 0x84]
push ecx
call fcn.00472930
mov dword [esp + 0x28], 0x415dd0
mov dword [esp + 0x18], 0x438760
mov dword [esp + 0x20], 0x14
jmp 0x41620a
lea edx, [esp + 0x84]
push edx
call fcn.004253f0
mov dword [esp + 0x28], 0x415d40
mov dword [esp + 0x18], 0x424ac0
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x44], 0x30
mov byte [esp + 0x17], 0
jmp 0x41620a
lea eax, [esp + 0x84]
push eax
call fcn.00438240
mov dword [esp + 0x28], 0x415e80
mov dword [esp + 0x18], 0x438380
mov dword [esp + 0x20], 0x20
jmp 0x41620a
sub eax, 0x2a1
je 0x4161d8
sub eax, 1
je 0x4161c5
sub eax, 1
je 0x41619e
push 0x56e9c8
push 0x20d
push str.._ssl_s3_cbc.c
call fcn.00426230
add esp, 0xc
test ebx, ebx
je 0x41676f
mov dword [ebx], 0xffffffff
jmp 0x41676f
lea ecx, [esp + 0x84]
push ecx
call fcn.004381e0
mov dword [esp + 0x28], 0x415e80
mov dword [esp + 0x18], 0x438380
mov dword [esp + 0x20], 0x1c
jmp 0x41620a
lea edx, [esp + 0x84]
push edx
call fcn.00437b90
mov dword [esp + 0x20], esi
jmp 0x4161ed
lea eax, [esp + 0x84]
push eax
call fcn.00437af0
mov dword [esp + 0x20], 0x30
mov dword [esp + 0x1c], 0x10
mov esi, 0x80
mov dword [esp + 0x18], 0x4381c0
mov dword [esp + 0x28], 0x415f80
mov bl, byte [esp + 0x35c]
add esp, 4
mov dword [esp + 0x30], 0xd
test bl, bl
je 0x416233
mov ecx, dword [esp + 0x354]
mov edx, dword [esp + 0x40]
lea eax, [edx + ecx + 0xb]
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x18]
xor ecx, ecx
test bl, bl
sete cl
xor edi, edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], edi
lea ecx, [ecx*4 + 2]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x1c]
lea eax, [ecx + edx]
add eax, esi
xor edx, edx
lea eax, [eax + ebp - 1]
div esi
mov edx, dword [esp + 0x348]
add ecx, edx
xor edx, edx
mov ebp, eax
mov eax, ecx
div esi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x60], edx
xor edx, edx
add eax, ecx
div esi
xor edx, edx
test bl, bl
setne dl
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x2c]
add edx, eax
cmp ebp, edx
jbe 0x4162b1
sub ebp, eax
mov eax, ebp
mov dword [esp + 0x28], eax
imul eax, esi
mov dword [esp + 0x34], eax
mov edi, eax
cmp byte [esp + 0x358], 0
lea ebx, [ecx*8]
jne 0x416348
push esi
lea eax, [esp + 0x1b0]
push 0
push eax
lea ebx, [ebx + esi*8]
call fcn.00507800
mov ebp, dword [esp + 0x360]
add esp, 0xc
cmp ebp, 0x80
jbe 0x416302
push str.mac_secret_length___sizeof_hmac_pad_
push 0x266
push str.._ssl_s3_cbc.c
call fcn.00426230
add esp, 0xc
mov ecx, dword [esp + 0x44]
push ebp
push ecx
lea edx, [esp + 0x1b4]
push edx
call fcn.00507280
add esp, 0xc
xor eax, eax
test esi, esi
jbe 0x41632d
mov edi, edi
xor byte [esp + eax + 0x1ac], 0x36
inc eax
cmp eax, esi
jb 0x416320
mov ebp, dword [esp + 0x14]
lea eax, [esp + 0x1ac]
push eax
lea ecx, [esp + 0x88]
push ecx
call ebp
add esp, 8
jmp 0x41634c
mov ebp, dword [esp + 0x14]
cmp byte [esp + 0x13], 0
je 0x416395
mov edx, dword [esp + 0x18]
add edx, 0xfffffffc
push edx
lea eax, [esp + 0x160]
push 0
push eax
call fcn.00507800
mov eax, dword [esp + 0x24]
lea eax, [esp + eax + 0x168]
mov ecx, ebx
shr ecx, 0x18
mov byte [eax - 4], cl
mov edx, ebx
shr edx, 0x10
mov ecx, ebx
add esp, 0xc
shr ecx, 8
mov byte [eax - 3], dl
mov byte [eax - 2], cl
mov byte [eax - 1], bl
jmp 0x4163d2
mov ebp, dword [esp + 0x18]
push ebp
lea edx, [esp + 0x160]
push 0
push edx
call fcn.00507800
lea ebp, [esp + ebp + 0x168]
mov eax, ebx
mov ecx, ebx
shr eax, 0x18
shr ecx, 0x10
mov edx, ebx
add esp, 0xc
shr edx, 8
mov byte [ebp - 5], al
mov byte [ebp - 6], cl
mov byte [ebp - 7], dl
mov byte [ebp - 8], bl
mov ebp, dword [esp + 0x14]
test edi, edi
jbe 0x4164f5
cmp byte [esp + 0x358], 0
mov eax, dword [esp + 0x38]
je 0x416479
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x88]
push ecx
sub ebp, esi
call ebx
mov edx, dword [esp + 0x40]
push ebp
add edx, esi
push edx
lea eax, [esp + 0x23c]
push eax
call fcn.00507280
mov edx, dword [esp + 0x50]
mov ecx, esi
sub ecx, ebp
push ecx
push edx
lea eax, [esp + ebp + 0x248]
push eax
call fcn.00507280
lea ecx, [esp + 0x24c]
push ecx
lea edx, [esp + 0xa8]
push edx
call ebx
xor edx, edx
mov eax, edi
div esi
add esp, 0x28
dec eax
cmp eax, 1
jbe 0x4164f5
mov ebx, dword [esp + 0x3c]
sub ebx, ebp
add ebx, esi
lea edi, [eax - 1]
lea ecx, [ecx]
lea eax, [esp + 0x84]
push ebx
push eax
call dword [esp + 0x1c]
add esp, 8
add ebx, esi
sub edi, 1
jne 0x416460
jmp 0x4164f5
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x22c], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x230], edx
mov dl, byte [eax + 0xc]
lea eax, [esi - 0xd]
push eax
mov dword [esp + 0x238], ecx
lea ecx, [esp + 0x23d]
push ebx
push ecx
mov byte [esp + 0x244], dl
call fcn.00507280
lea edx, [esp + 0x238]
push edx
lea eax, [esp + 0x94]
push eax
call ebp
xor edx, edx
mov eax, edi
div esi
add esp, 0x14
cmp eax, 1
jbe 0x4164f5
lea ebx, [ebx + esi - 0xd]
lea edi, [eax - 1]
lea ecx, [ecx]
lea ecx, [esp + 0x84]
push ebx
push ecx
call ebp
add esp, 8
add ebx, esi
sub edi, 1
jne 0x4164e0
push 0x40
lea edx, [esp + 0x170]
push 0
push edx
call fcn.00507800
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
add ecx, eax
add esp, 0xc
mov dword [esp + 0x28], eax
mov dword [esp + 0x5c], ecx
cmp eax, ecx
ja 0x416668
jmp 0x416529
mov eax, dword [esp + 0x28]
mov edx, eax
xor edx, dword [esp + 0x48]
mov ebx, eax
xor ebx, dword [esp + 0x50]
dec edx
dec ebx
sar ebx, 0x1f
sar edx, 0x1f
xor ebp, ebp
mov byte [esp + 0x13], bl
test esi, esi
jbe 0x416609
mov edi, dword [esp + 0x60]
mov eax, esi
sub eax, dword [esp + 0x18]
not bl
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x18]
mov byte [esp + 0x22], bl
or bl, dl
neg edi
sub eax, esi
lea ecx, [esp + eax + 0x15c]
mov byte [esp + 0x23], bl
mov dword [esp + 0x2c], ecx
jmp 0x416580
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
xor bl, bl
cmp eax, ecx
jae 0x416594
mov ecx, dword [esp + 0x38]
jmp 0x4165ad
mov eax, dword [esp + 0x34c]
add ecx, eax
mov eax, dword [esp + 0x34]
cmp eax, ecx
jae 0x4165b0
mov ecx, dword [esp + 0x3c]
sub ecx, dword [esp + 0x30]
mov bl, byte [ecx + eax]
inc eax
mov dword [esp + 0x34], eax
mov eax, edi
not eax
sar eax, 0x1f
and al, dl
mov cl, al
and al, 0x80
not cl
and cl, bl
mov bl, byte [esp + 0x13]
or cl, al
lea eax, [edi - 1]
not eax
sar eax, 0x1f
and al, dl
not al
and cl, al
and cl, byte [esp + 0x23]
cmp ebp, dword [esp + 0x68]
jb 0x4165f4
mov al, byte [esp + 0x22]
and al, cl
mov ecx, dword [esp + 0x2c]
mov cl, byte [ecx]
and cl, bl
or cl, al
inc dword [esp + 0x2c]
mov byte [esp + ebp + 0x2ac], cl
inc ebp
inc edi
cmp ebp, esi
jb 0x416580
lea edx, [esp + 0x2ac]
push edx
lea eax, [esp + 0x88]
push eax
call dword [esp + 0x1c]
lea ecx, [esp + 0x2b4]
push ecx
lea edx, [esp + 0x90]
push edx
call dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
add esp, 0x10
xor eax, eax
test edi, edi
jbe 0x416655
mov edi, edi
mov cl, byte [esp + eax + 0x2ac]
and cl, bl
or byte [esp + eax + 0x16c], cl
inc eax
cmp eax, edi
jb 0x416640
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x5c]
jbe 0x416525
lea edx, [esp + 0x6c]
push edx
call fcn.0042a300
mov eax, dword [esp + 0x68]
mov ecx, dword [eax]
push 0
push ecx
lea edx, [esp + 0x78]
push edx
call fcn.0042a350
add esp, 0x10
cmp byte [esp + 0x358], 0
je 0x4166f5
mov esi, dword [esp + 0x40]
push esi
lea eax, [esp + 0x1b0]
push 0x5c
push eax
call fcn.00507800
mov ecx, dword [esp + 0x360]
mov edx, dword [esp + 0x50]
push ecx
push edx
lea eax, [esp + 0x80]
push eax
call fcn.0042a500
push esi
lea ecx, [esp + 0x1c8]
push ecx
lea edx, [esp + 0x8c]
push edx
call fcn.0042a500
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0x194]
push ecx
lea edx, [esp + 0x98]
push edx
call fcn.0042a500
add esp, 0x30
jmp 0x41673d
xor eax, eax
test esi, esi
jbe 0x41670d
jmp 0x416700
xor byte [esp + eax + 0x1ac], 0x6a
inc eax
cmp eax, esi
jb 0x416700
push esi
lea eax, [esp + 0x1b0]
push eax
lea ecx, [esp + 0x74]
push ecx
call fcn.0042a500
mov edx, dword [esp + 0x28]
push edx
lea eax, [esp + 0x17c]
push eax
lea ecx, [esp + 0x80]
push ecx
call fcn.0042a500
add esp, 0x18
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x4c]
push edx
push eax
lea ecx, [esp + 0x74]
push ecx
call fcn.0042a670
mov eax, dword [esp + 0x64]
add esp, 0xc
test eax, eax
je 0x416762
mov edx, dword [esp + 0x4c]
mov dword [eax], edx
lea eax, [esp + 0x6c]
push eax
call fcn.0042a590
add esp, 4
mov ecx, dword [esp + 0x32c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004bcc20
add esp, 0x320
ret