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

Disassembly:
mov eax, 0x320
call fcn.10031300
mov eax, dword [0x10040dd0]
xor eax, esp
mov dword [esp + 0x31c], eax
mov eax, dword [esp + 0x324]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x328]
push ebx
mov ebx, dword [esp + 0x330]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x334]
push ebp
push esi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x340]
push edi
mov edi, dword [esp + 0x34c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x350]
mov esi, 0x28
mov dword [esp + 0x50], ebx
mov dword [esp + 0x4c], eax
mov ebp, 0x40
mov dword [esp + 0x40], esi
mov dword [esp + 0x18], 8
mov byte [esp + 0x13], 1
cmp edi, 0x100000
jb 0x100132bf
push str.data_plus_mac_plus_padding_size___10241024
push 0x1d7
push str.._ssl_s3_cbc.c
call sub.LIBEAY32.dll_Ordinal_3244
add esp, 0xc
push dword [esp + 0x48]
call sub.LIBEAY32.dll_Ordinal_3896
push eax
call sub.LIBEAY32.dll_Ordinal_3837
add esp, 8
cmp eax, 0x2a0
jg 0x10013378
je 0x1001334e
cmp eax, 4
je 0x10013316
cmp eax, 0x40
jne 0x10013385
lea eax, [esp + 0x84]
push eax
call sub.LIBEAY32.dll_Ordinal_503
mov eax, 0x14
mov dword [esp + 0x2c], 0x10013c10
mov dword [esp + 0x18], 0x10030ee4
lea edx, [eax - 0xc]
jmp 0x10013415
lea eax, [esp + 0x84]
push eax
call sub.LIBEAY32.dll_Ordinal_341
mov eax, 0x10
mov esi, 0x30
mov dword [esp + 0x2c], 0x10013b90
mov dword [esp + 0x18], 0x10030f14
mov dword [esp + 0x44], esi
mov byte [esp + 0x17], 0
lea edx, [eax - 8]
jmp 0x10013415
lea eax, [esp + 0x84]
push eax
call sub.LIBEAY32.dll_Ordinal_3479
mov eax, 0x20
mov dword [esp + 0x2c], 0x10013cb0
mov dword [esp + 0x18], 0x10030ef6
lea edx, [eax - 0x18]
jmp 0x10013415
sub eax, 0x2a1
je 0x100133e7
dec eax
je 0x100133d6
dec eax
je 0x100133af
push 0x10033988
push 0x20d
push str.._ssl_s3_cbc.c
call sub.LIBEAY32.dll_Ordinal_3244
add esp, 0xc
test ebx, ebx
je 0x1001398b
mov dword [ebx], 0xffffffff
jmp 0x1001398b
lea eax, [esp + 0x84]
push eax
call sub.LIBEAY32.dll_Ordinal_3631
mov eax, 0x1c
mov dword [esp + 0x2c], 0x10013cb0
mov dword [esp + 0x18], 0x10030ef6
lea edx, [eax - 0x14]
jmp 0x10013415
lea eax, [esp + 0x84]
push eax
call sub.LIBEAY32.dll_Ordinal_3633
mov eax, ebp
jmp 0x100133f9
lea eax, [esp + 0x84]
push eax
call sub.LIBEAY32.dll_Ordinal_3737
mov eax, 0x30
mov edx, 0x10
mov dword [esp + 0x1c], edx
lea ebp, [edx + 0x70]
mov dword [esp + 0x18], 0x10030f08
mov dword [esp + 0x2c], 0x10013da0
add esp, 4
cmp byte [esp + 0x358], 0
mov ebx, 0xd
mov dword [esp + 0x1c], eax
mov dword [esp + 0x44], ebx
je 0x1001343f
mov ebx, dword [esp + 0x354]
add ebx, 0xb
add ebx, esi
mov dword [esp + 0x44], ebx
xor ecx, ecx
cmp byte [esp + 0x358], cl
mov esi, ebx
sete cl
sub esi, eax
lea eax, [edx - 1]
add eax, esi
add eax, ebp
add eax, edi
xor edx, edx
div ebp
add esi, dword [esp + 0x348]
xor edx, edx
lea ecx, [ecx*4 + 2]
mov dword [esp + 0x2c], ecx
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x38], eax
mov eax, esi
div ebp
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x3c], edx
xor edx, edx
lea eax, [esi + eax]
div ebp
cmp byte [esp + 0x358], cl
mov edx, dword [esp + 0x2c]
setne cl
add ecx, edx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x20]
cmp eax, ecx
jbe 0x100134c4
sub eax, edx
mov edi, eax
imul edi, ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], edi
cmp byte [esp + 0x358], 0
lea eax, [esi*8]
mov dword [esp + 0x20], eax
jne 0x10013568
lea eax, [eax + ebp*8]
push ebp
mov dword [esp + 0x24], eax
lea eax, [esp + 0x1b0]
push 0
push eax
call sub.MSVCR110.dll_memset
mov esi, dword [esp + 0x360]
add esp, 0xc
cmp esi, 0x80
jbe 0x1001351d
push str.mac_secret_length___sizeof_hmac_pad_
push 0x266
push str.._ssl_s3_cbc.c
call sub.LIBEAY32.dll_Ordinal_3244
add esp, 0xc
push esi
push dword [esp + 0x50]
lea eax, [esp + 0x1b4]
push eax
call sub.MSVCR110.dll_memcpy
add esp, 0xc
xor eax, eax
test ebp, ebp
je 0x1001354d
jmp 0x10013540
xor byte [esp + eax + 0x1ac], 0x36
inc eax
cmp eax, ebp
jb 0x10013540
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x1ac]
push eax
lea eax, [esp + 0x88]
push eax
call esi
add esp, 8
jmp 0x1001356c
mov esi, dword [esp + 0x14]
cmp byte [esp + 0x13], 0
je 0x100135c2
mov eax, dword [esp + 0x18]
add eax, 0xfffffffc
push eax
lea eax, [esp + 0x160]
push 0
push eax
call sub.MSVCR110.dll_memset
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov eax, ecx
shr eax, 0x18
mov byte [esp + edx + 0x164], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + edx + 0x165], al
mov eax, ecx
add esp, 0xc
shr eax, 8
mov byte [esp + edx + 0x15a], al
mov byte [esp + edx + 0x15b], cl
jmp 0x1001360b
push dword [esp + 0x18]
lea eax, [esp + 0x160]
push 0
push eax
call sub.MSVCR110.dll_memset
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov eax, ecx
shr eax, 0x18
mov byte [esp + edx + 0x163], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + edx + 0x162], al
mov eax, ecx
add esp, 0xc
shr eax, 8
mov byte [esp + edx + 0x155], al
mov byte [esp + edx + 0x154], cl
test edi, edi
je 0x10013728
cmp byte [esp + 0x358], 0
je 0x100136aa
push dword [esp + 0x30]
lea eax, [esp + 0x88]
push eax
sub ebx, ebp
call esi
mov eax, dword [esp + 0x38]
add eax, ebp
push ebx
push eax
lea eax, [esp + 0x23c]
push eax
call sub.MSVCR110.dll_memcpy
mov eax, ebp
sub eax, ebx
push eax
push dword [esp + 0x4c]
lea eax, [esp + 0x248]
add eax, ebx
push eax
call sub.MSVCR110.dll_memcpy
lea eax, [esp + 0x24c]
push eax
lea eax, [esp + 0xa8]
push eax
call esi
xor edx, edx
mov eax, edi
div ebp
add esp, 0x28
dec eax
cmp eax, 1
jbe 0x10013728
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x14]
sub esi, ebx
add esi, ebp
lea ebx, [eax - 1]
lea eax, [esp + 0x84]
push esi
push eax
call edi
add esp, 8
add esi, ebp
dec ebx
jne 0x10013692
jmp 0x10013724
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov eax, dword [ecx + 8]
movq xmm0, qword [ecx]
mov dword [esp + 0x234], eax
mov al, byte [ecx + 0xc]
mov byte [esp + 0x238], al
lea eax, [ebp - 0xd]
push eax
lea eax, [esp + 0x23d]
push ebx
push eax
movq qword [esp + 0x238], xmm0
call sub.MSVCR110.dll_memcpy
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x94]
push eax
call esi
xor edx, edx
mov eax, edi
div ebp
add esp, 0x14
cmp eax, 1
jbe 0x10013728
mov edi, dword [esp + 0x14]
lea esi, [ebx - 0xd]
add esi, ebp
lea ebx, [eax - 1]
lea eax, [esp + 0x84]
push esi
push eax
call edi
add esp, 8
add esi, ebp
dec ebx
jne 0x10013711
mov edi, dword [esp + 0x24]
push 0x40
lea eax, [esp + 0x170]
push 0
push eax
call sub.MSVCR110.dll_memset
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
add eax, ecx
add esp, 0xc
mov dword [esp + 0x64], eax
cmp ecx, eax
ja 0x10013898
mov eax, ecx
xor eax, dword [esp + 0x58]
mov ebx, ecx
xor ebx, dword [esp + 0x68]
dec eax
dec ebx
sar eax, 0x1f
sar ebx, 0x1f
mov dword [esp + 0x2c], eax
test ebp, ebp
je 0x1001383d
mov esi, dword [esp + 0x3c]
mov dh, bl
not dh
mov cl, dh
or cl, al
mov eax, ebp
sub eax, dword [esp + 0x18]
neg esi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
sub eax, ebp
mov byte [esp + 0x13], cl
lea eax, [esp + eax + 0x15c]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x2ac]
add eax, dword [esp + 0x3c]
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x44]
xor dl, dl
cmp edi, ecx
jae 0x100137c2
mov eax, dword [esp + 0x30]
jmp 0x100137d5
mov eax, dword [esp + 0x34c]
add eax, ecx
cmp edi, eax
jae 0x100137d8
mov eax, dword [esp + 0x34]
sub eax, ecx
mov dl, byte [eax + edi]
mov ecx, esi
not ecx
sar ecx, 0x1f
and cl, byte [esp + 0x2c]
inc edi
mov al, cl
and cl, 0x80
not al
and al, dl
or al, cl
lea ecx, [esi - 1]
not ecx
sar ecx, 0x1f
and cl, byte [esp + 0x2c]
not cl
and al, cl
mov ecx, dword [esp + 0x3c]
and al, byte [esp + 0x13]
add ecx, esi
cmp ecx, dword [esp + 0x20]
jb 0x1001381f
mov ecx, dword [esp + 0x24]
mov dl, byte [ecx]
mov cl, dh
and cl, al
and dl, bl
or dl, cl
mov al, dl
mov ecx, dword [esp + 0x5c]
inc dword [esp + 0x24]
mov byte [ecx + esi], al
mov eax, dword [esp + 0x3c]
inc esi
add eax, esi
cmp eax, ebp
jb 0x100137b2
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x2ac]
push eax
lea eax, [esp + 0x88]
push eax
call dword [esp + 0x1c]
lea eax, [esp + 0x2b4]
push eax
lea eax, [esp + 0x90]
push eax
call dword [esp + 0x38]
add esp, 0x10
xor ecx, ecx
test esi, esi
je 0x10013885
mov edi, edi
mov al, byte [esp + ecx + 0x2ac]
and al, bl
or byte [esp + ecx + 0x16c], al
inc ecx
cmp ecx, esi
jb 0x10013870
mov ecx, dword [esp + 0x38]
inc ecx
mov dword [esp + 0x38], ecx
cmp ecx, dword [esp + 0x64]
jbe 0x10013756
lea eax, [esp + 0x6c]
push eax
call sub.LIBEAY32.dll_Ordinal_2630
mov eax, dword [esp + 0x4c]
push 0
push dword [eax]
lea eax, [esp + 0x78]
push eax
call sub.LIBEAY32.dll_Ordinal_3109
add esp, 0x10
cmp byte [esp + 0x358], 0
je 0x1001391b
mov edi, dword [esp + 0x40]
push edi
lea eax, [esp + 0x1b0]
push 0x5c
push eax
call sub.MSVCR110.dll_memset
push dword [esp + 0x360]
lea eax, [esp + 0x7c]
push dword [esp + 0x5c]
push eax
call sub.LIBEAY32.dll_Ordinal_269
push edi
lea eax, [esp + 0x1c8]
push eax
lea eax, [esp + 0x8c]
push eax
call sub.LIBEAY32.dll_Ordinal_269
push esi
lea eax, [esp + 0x194]
push eax
lea eax, [esp + 0x98]
push eax
call sub.LIBEAY32.dll_Ordinal_269
add esp, 0x30
jmp 0x1001395a
xor eax, eax
test ebp, ebp
je 0x1001392e
xor byte [esp + eax + 0x1ac], 0x6a
inc eax
cmp eax, ebp
jb 0x10013921
push ebp
lea eax, [esp + 0x1b0]
push eax
lea eax, [esp + 0x74]
push eax
call sub.LIBEAY32.dll_Ordinal_269
push esi
lea eax, [esp + 0x17c]
push eax
lea eax, [esp + 0x80]
push eax
call sub.LIBEAY32.dll_Ordinal_269
add esp, 0x18
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x58]
lea eax, [esp + 0x74]
push eax
call sub.LIBEAY32.dll_Ordinal_267
mov ecx, dword [esp + 0x5c]
add esp, 0xc
test ecx, ecx
je 0x1001397e
mov eax, dword [esp + 0x60]
mov dword [ecx], eax
lea eax, [esp + 0x6c]
push eax
call sub.LIBEAY32.dll_Ordinal_2821
add esp, 4
mov ecx, dword [esp + 0x32c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10031346
add esp, 0x320
ret