Function at 0x513840
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x344
call fcn.004855d0
mov eax, dword [0x62b370]
xor eax, esp
mov dword [esp + 0x340], eax
cmp dword [ebp + 0x20], 0x100000
mov eax, dword [ebp + 8]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [esp + 0x64], eax
mov ebx, 0x40
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x18]
push edi
mov dword [esp + 0x30], eax
mov edi, 8
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x70], esi
mov dword [esp + 0x54], eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x50], 0x28
mov dword [esp + 0x24], edi
mov byte [esp + 0x17], 1
jb 0x5138ca
push str.data_plus_mac_plus_padding_size___10241024
push 0x1d7
push str.._ssl_s3_cbc.c
call fcn.00524780
add esp, 0xc
push dword [esp + 0x58]
call fcn.005202b0
push eax
call fcn.0052a4f0
add esp, 8
cmp eax, 0x2a0
jg 0x51397a
je 0x513953
cmp eax, 4
je 0x51391e
cmp eax, 0x40
jne 0x51398b
lea eax, [esp + 0xa0]
push eax
call fcn.00535c50
mov dword [esp + 0x30], 0x5142f0
mov ecx, 0x14
mov dword [esp + 0x1c], 0x535c90
jmp 0x513a2e
lea eax, [esp + 0xa0]
push eax
call fcn.00522e30
mov edx, 0x30
mov dword [esp + 0x30], 0x514270
mov dword [esp + 0x1c], 0x522e70
mov ecx, 0x10
mov dword [esp + 0x54], edx
mov byte [esp + 0x1b], 0
jmp 0x513a33
lea eax, [esp + 0xa0]
push eax
call fcn.005360d0
mov dword [esp + 0x30], 0x514390
mov ecx, 0x20
mov dword [esp + 0x1c], 0x536130
jmp 0x513a2e
sub eax, 0x2a1
je 0x5139fa
sub eax, 1
je 0x5139e9
sub eax, 1
je 0x5139c5
push 0x5ba79c
push 0x20d
push str.._ssl_s3_cbc.c
call fcn.00524780
add esp, 0xc
test esi, esi
je 0x514072
mov dword [esi], 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.00484636
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0xa0]
push eax
call fcn.00535d90
mov dword [esp + 0x30], 0x514390
mov ecx, 0x1c
mov dword [esp + 0x1c], 0x536130
jmp 0x513a2e
lea eax, [esp + 0xa0]
push eax
call fcn.00536860
mov ecx, ebx
jmp 0x513a0c
lea eax, [esp + 0xa0]
push eax
call fcn.00536230
mov ecx, 0x30
mov edi, 0x10
mov dword [esp + 0x1c], 0x536910
mov ebx, 0x80
mov dword [esp + 0x28], edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x30], 0x514480
mov edx, 0x28
add esp, 4
mov dword [esp + 0x20], ecx
cmp byte [ebp + 0x2c], 0
mov eax, 0xd
mov dword [esp + 0x3c], eax
je 0x513a55
mov eax, dword [ebp + 0x28]
add eax, 0xb
add eax, edx
mov dword [esp + 0x3c], eax
xor edx, edx
mov esi, eax
cmp byte [ebp + 0x2c], dl
sete dl
sub esi, ecx
mov ecx, dword [ebp + 0x20]
dec ecx
lea edx, [edx*4 + 2]
mov dword [esp + 0x34], edx
lea eax, [esi + edi]
add eax, ebx
xor edx, edx
add eax, ecx
xor edi, edi
div ebx
mov ecx, dword [ebp + 0x1c]
xor edx, edx
add ecx, esi
mov dword [esp + 0x1c], eax
xor eax, eax
mov esi, dword [esp + 0x24]
mov dword [esp + 0x40], eax
mov eax, ecx
div ebx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], edx
xor edx, edx
mov dword [esp + 0x5c], eax
lea eax, [ecx + esi]
div ebx
mov edx, dword [esp + 0x34]
xor ecx, ecx
cmp byte [ebp + 0x2c], cl
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x1c]
setne cl
add ecx, edx
mov dword [esp + 0x28], edi
cmp eax, ecx
jbe 0x513ad6
sub eax, edx
mov edi, eax
mov dword [esp + 0x40], eax
imul edi, ebx
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x4c]
shl eax, 3
cmp byte [ebp + 0x2c], 0
mov dword [esp + 0x1c], eax
jne 0x513b9c
lea eax, [eax + ebx*8]
push ebx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1cc]
push 0
push eax
call fcn.004d7c10
mov eax, dword [ebp + 0x28]
add esp, 0xc
cmp eax, 0x80
jbe 0x513b29
push str.mac_secret_length___sizeof_hmac_pad_
push 0x266
push str.._ssl_s3_cbc.c
call fcn.00524780
mov eax, dword [ebp + 0x28]
add esp, 0xc
push eax
push dword [esp + 0x58]
lea eax, [esp + 0x1d0]
push eax
call fcn.004d4c70
movaps xmm2, xmmword [str.6666666666666666jjjjjjjjjjjjjjjj._ssld1_pkt.c]
add esp, 0xc
xor eax, eax
nop word [eax + eax]
movups xmm0, xmmword [esp + eax + 0x1c8]
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmmword [esp + eax + 0x1c8], xmm1
movups xmm0, xmmword [esp + eax + 0x1d8]
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmmword [esp + eax + 0x1d8], xmm1
add eax, 0x20
cmp eax, ebx
jb 0x513b50
lea eax, [esp + 0x1c8]
push eax
lea eax, [esp + 0xa4]
push eax
call dword [esp + 0x20]
add esp, 8
cmp byte [esp + 0x17], 0
je 0x513bea
lea eax, [esi - 4]
push eax
lea eax, [esp + 0x17c]
push 0
push eax
call fcn.004d7c10
mov ecx, dword [esp + 0x28]
add esp, 0xc
mov eax, ecx
mov byte [esp + esi + 0x177], cl
shr eax, 0x18
mov byte [esp + esi + 0x174], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + esi + 0x175], al
mov eax, ecx
shr eax, 8
mov byte [esp + esi + 0x176], al
jmp 0x513c2c
push esi
lea eax, [esp + 0x17c]
push 0
push eax
call fcn.004d7c10
mov ecx, dword [esp + 0x28]
add esp, 0xc
mov eax, ecx
mov byte [esp + esi + 0x170], cl
shr eax, 0x18
mov byte [esp + esi + 0x173], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + esi + 0x172], al
mov eax, ecx
shr eax, 8
mov byte [esp + esi + 0x171], al
test edi, edi
je 0x513d60
cmp byte [ebp + 0x2c], 0
je 0x513cd9
mov eax, dword [esp + 0x3c]
push dword [esp + 0x38]
sub eax, ebx
mov dword [esp + 0x20], eax
lea eax, [esp + 0xa4]
push eax
call dword [esp + 0x20]
push dword [esp + 0x24]
mov eax, dword [esp + 0x44]
add eax, ebx
push eax
lea eax, [esp + 0x258]
push eax
call fcn.004d4c70
mov eax, ebx
sub eax, dword [esp + 0x30]
push eax
push dword [esp + 0x48]
lea eax, [esp + 0x264]
add eax, dword [esp + 0x38]
push eax
call fcn.004d4c70
lea eax, [esp + 0x268]
push eax
lea eax, [esp + 0xc4]
push eax
call dword [esp + 0x40]
xor edx, edx
mov eax, edi
div ebx
add esp, 0x28
dec eax
cmp eax, 1
jbe 0x513d60
mov esi, dword [esp + 0x30]
lea edi, [eax - 1]
sub esi, dword [esp + 0x1c]
add esi, ebx
lea eax, [esp + 0xa0]
push esi
push eax
call dword [esp + 0x20]
add esp, 8
add esi, ebx
sub edi, 1
jne 0x513cc0
jmp 0x513d58
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 8]
movq xmm0, qword [ecx]
mov dword [esp + 0x250], eax
mov al, byte [ecx + 0xc]
mov byte [esp + 0x254], al
lea eax, [ebx - 0xd]
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x25d]
movq qword [esp + 0x250], xmm0
push eax
call fcn.004d4c70
lea eax, [esp + 0x254]
push eax
lea eax, [esp + 0xb0]
push eax
call dword [esp + 0x2c]
xor edx, edx
mov eax, edi
div ebx
add esp, 0x14
cmp eax, 1
jbe 0x513d60
mov esi, dword [esp + 0x30]
lea edi, [eax - 1]
add esi, 0xfffffff3
add esi, ebx
lea eax, [esp + 0xa0]
push esi
push eax
call dword [esp + 0x20]
add esp, 8
add esi, ebx
sub edi, 1
jne 0x513d41
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
push 0x40
lea eax, [esp + 0x18c]
push 0
push eax
call fcn.004d7c10
mov eax, dword [esp + 0x40]
add esp, 0xc
mov ecx, dword [esp + 0x40]
add eax, ecx
mov dword [esp + 0x64], eax
cmp ecx, eax
ja 0x513f52
mov eax, ebx
sub eax, esi
sub esi, ebx
mov dword [esp + 0x1c], eax
lea ebx, [esp + 0x178]
mov eax, dword [esp + 0x48]
mov edx, eax
neg edx
add ebx, esi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x68], ebx
lea eax, [esp + eax + 0x2c8]
mov dword [esp + 0x24], eax
nop dword [eax + eax]
mov esi, dword [esp + 0x4c]
mov edx, ecx
xor ecx, dword [esp + 0x60]
xor edx, dword [esp + 0x5c]
dec ecx
sar ecx, 0x1f
dec edx
movsx eax, cl
mov dword [esp + 0x34], ecx
mov ch, cl
not ch
sar edx, 0x1f
mov dword [esp + 0x28], edx
movd xmm0, eax
mov al, ch
punpcklbw xmm0, xmm0
or al, dl
punpcklwd xmm0, xmm0
pshufd xmm0, xmm0, 0
movaps xmmword [esp + 0x90], xmm0
mov byte [esp + 0x17], al
mov eax, dword [esp + 0x3c]
xor cl, cl
cmp edi, eax
jae 0x513e16
mov eax, dword [esp + 0x38]
jmp 0x513e29
add eax, dword [ebp + 0x20]
mov edx, dword [esp + 0x28]
cmp edi, eax
jae 0x513e2c
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x3c]
mov cl, byte [eax + edi]
mov eax, esi
inc edi
not eax
sar eax, 0x1f
and al, dl
mov dl, al
and al, 0x80
not dl
and dl, cl
or dl, al
lea eax, [esi - 1]
not eax
sar eax, 0x1f
and al, byte [esp + 0x28]
not al
and dl, al
mov eax, dword [esp + 0x48]
and dl, byte [esp + 0x17]
add eax, esi
cmp eax, dword [esp + 0x1c]
jb 0x513e6e
mov cl, byte [ebx]
mov al, ch
and cl, byte [esp + 0x34]
and al, dl
or cl, al
mov dl, cl
mov eax, dword [esp + 0x24]
inc ebx
mov byte [eax + esi], dl
inc esi
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x28]
add eax, esi
cmp eax, dword [esp + 0x44]
jb 0x513e06
lea eax, [esp + 0x2c8]
push eax
lea eax, [esp + 0xa4]
push eax
call dword [esp + 0x20]
lea eax, [esp + 0x2d0]
push eax
lea eax, [esp + 0xac]
push eax
call dword [esp + 0x3c]
mov esi, dword [esp + 0x30]
add esp, 0x10
xor eax, eax
cmp esi, 0x20
jb 0x513f17
movaps xmm2, xmmword [esp + 0x90]
mov ecx, esi
and ecx, 0xffffffe0
nop
movups xmm0, xmmword [esp + eax + 0x188]
movups xmm1, xmmword [esp + eax + 0x2c8]
pand xmm1, xmm2
por xmm1, xmm0
movups xmmword [esp + eax + 0x188], xmm1
movups xmm1, xmmword [esp + eax + 0x2d8]
movups xmm0, xmmword [esp + eax + 0x198]
pand xmm1, xmm2
por xmm1, xmm0
movups xmmword [esp + eax + 0x198], xmm1
add eax, 0x20
cmp eax, ecx
jb 0x513ed0
cmp eax, esi
jae 0x513f35
mov edx, dword [esp + 0x34]
nop
mov cl, byte [esp + eax + 0x2c8]
and cl, dl
or byte [esp + eax + 0x188], cl
inc eax
cmp eax, esi
jb 0x513f20
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x68]
inc ecx
mov dword [esp + 0x40], ecx
cmp ecx, dword [esp + 0x64]
jbe 0x513dc0
mov ebx, dword [esp + 0x44]
jmp 0x513f56
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x78]
push eax
call fcn.00527230
mov eax, dword [esp + 0x5c]
push 0
push dword [eax]
lea eax, [esp + 0x84]
push eax
call fcn.00526e20
add esp, 0x10
cmp byte [ebp + 0x2c], 0
je 0x513fd7
mov edi, dword [esp + 0x50]
lea eax, [esp + 0x1c8]
push edi
push 0x5c
push eax
call fcn.004d7c10
push dword [ebp + 0x28]
lea eax, [esp + 0x88]
push dword [esp + 0x64]
push eax
call fcn.00526fc0
push edi
lea eax, [esp + 0x1e4]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00526fc0
push esi
lea eax, [esp + 0x1b0]
push eax
lea eax, [esp + 0xa4]
push eax
call fcn.00526fc0
add esp, 0x30
jmp 0x51403e
movaps xmm1, xmmword [0x5ccce0]
xor eax, eax
movups xmm0, xmmword [esp + eax + 0x1c8]
pxor xmm0, xmm1
movups xmmword [esp + eax + 0x1c8], xmm0
movups xmm0, xmmword [esp + eax + 0x1d8]
pxor xmm0, xmm1
movups xmmword [esp + eax + 0x1d8], xmm0
add eax, 0x20
cmp eax, ebx
jb 0x513fe0
push ebx
lea eax, [esp + 0x1cc]
push eax
lea eax, [esp + 0x80]
push eax
call fcn.00526fc0
push esi
lea eax, [esp + 0x198]
push eax
lea eax, [esp + 0x8c]
push eax
call fcn.00526fc0
add esp, 0x18
lea eax, [esp + 0x74]
push eax
push dword [esp + 0x70]
lea eax, [esp + 0x80]
push eax
call fcn.00526d50
mov ecx, dword [esp + 0x7c]
add esp, 0xc
test ecx, ecx
je 0x514065
mov eax, dword [esp + 0x74]
mov dword [ecx], eax
lea eax, [esp + 0x78]
push eax
call fcn.00526fd0
add esp, 4
mov ecx, dword [esp + 0x34c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00484636
mov esp, ebp
pop ebp
ret