Function at 0x497870
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.0044d7a0
mov eax, dword [0x556008]
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 0x4978fa
push str.data_plus_mac_plus_padding_size___10241024
push 0x1d7
push str.._ssl_s3_cbc.c
call fcn.004a87c0
add esp, 0xc
push dword [esp + 0x58]
call fcn.004a3e20
push eax
call fcn.0049fec0
add esp, 8
cmp eax, 0x2a0
jg 0x4979aa
je 0x497983
cmp eax, 4
je 0x49794e
cmp eax, 0x40
jne 0x4979bb
lea eax, [esp + 0xa0]
push eax
call fcn.004f6cf0
mov dword [esp + 0x30], 0x498320
mov ecx, 0x14
mov dword [esp + 0x1c], 0x4b9c70
jmp 0x497a5e
lea eax, [esp + 0xa0]
push eax
call fcn.004a74c0
mov edx, 0x30
mov dword [esp + 0x30], 0x4982a0
mov dword [esp + 0x1c], 0x4a6e80
mov ecx, 0x10
mov dword [esp + 0x54], edx
mov byte [esp + 0x1b], 0
jmp 0x497a63
lea eax, [esp + 0xa0]
push eax
call fcn.004ba0b0
mov dword [esp + 0x30], 0x4983c0
mov ecx, 0x20
mov dword [esp + 0x1c], 0x4ba110
jmp 0x497a5e
sub eax, 0x2a1
je 0x497a2a
sub eax, 1
je 0x497a19
sub eax, 1
je 0x4979f5
push 0x50b4b0
push 0x20d
push str.._ssl_s3_cbc.c
call fcn.004a87c0
add esp, 0xc
test esi, esi
je 0x4980a2
mov dword [esi], 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.0041ea4f
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0xa0]
push eax
call fcn.004b9d70
mov dword [esp + 0x30], 0x4983c0
mov ecx, 0x1c
mov dword [esp + 0x1c], 0x4ba110
jmp 0x497a5e
lea eax, [esp + 0xa0]
push eax
call fcn.004ba840
mov ecx, ebx
jmp 0x497a3c
lea eax, [esp + 0xa0]
push eax
call fcn.004ba210
mov ecx, 0x30
mov edi, 0x10
mov dword [esp + 0x1c], 0x4ba8f0
mov ebx, 0x80
mov dword [esp + 0x28], edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x30], 0x4984b0
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 0x497a85
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 0x497b06
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 0x497bcc
lea eax, [eax + ebx*8]
push ebx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1cc]
push 0
push eax
call fcn.0042c0b0
mov eax, dword [ebp + 0x28]
add esp, 0xc
cmp eax, 0x80
jbe 0x497b59
push str.mac_secret_length___sizeof_hmac_pad_
push 0x266
push str.._ssl_s3_cbc.c
call fcn.004a87c0
mov eax, dword [ebp + 0x28]
add esp, 0xc
push eax
push dword [esp + 0x58]
lea eax, [esp + 0x1d0]
push eax
call fcn.0042b770
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 0x497b80
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 0x497c1a
lea eax, [esi - 4]
push eax
lea eax, [esp + 0x17c]
push 0
push eax
call fcn.0042c0b0
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 0x497c5c
push esi
lea eax, [esp + 0x17c]
push 0
push eax
call fcn.0042c0b0
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 0x497d90
cmp byte [ebp + 0x2c], 0
je 0x497d09
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.0042b770
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.0042b770
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 0x497d90
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 0x497cf0
jmp 0x497d88
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.0042b770
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 0x497d90
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 0x497d71
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
push 0x40
lea eax, [esp + 0x18c]
push 0
push eax
call fcn.0042c0b0
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 0x497f82
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 0x497e46
mov eax, dword [esp + 0x38]
jmp 0x497e59
add eax, dword [ebp + 0x20]
mov edx, dword [esp + 0x28]
cmp edi, eax
jae 0x497e5c
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 0x497e9e
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 0x497e36
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 0x497f47
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 0x497f00
cmp eax, esi
jae 0x497f65
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 0x497f50
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x68]
inc ecx
mov dword [esp + 0x40], ecx
cmp ecx, dword [esp + 0x64]
jbe 0x497df0
mov ebx, dword [esp + 0x44]
jmp 0x497f86
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x78]
push eax
call fcn.004ab240
mov eax, dword [esp + 0x5c]
push 0
push dword [eax]
lea eax, [esp + 0x84]
push eax
call fcn.004aae30
add esp, 0x10
cmp byte [ebp + 0x2c], 0
je 0x498007
mov edi, dword [esp + 0x50]
lea eax, [esp + 0x1c8]
push edi
push 0x5c
push eax
call fcn.0042c0b0
push dword [ebp + 0x28]
lea eax, [esp + 0x88]
push dword [esp + 0x64]
push eax
call fcn.004aafd0
push edi
lea eax, [esp + 0x1e4]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.004aafd0
push esi
lea eax, [esp + 0x1b0]
push eax
lea eax, [esp + 0xa4]
push eax
call fcn.004aafd0
add esp, 0x30
jmp 0x49806e
movaps xmm1, xmmword [0x520cc0]
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 0x498010
push ebx
lea eax, [esp + 0x1cc]
push eax
lea eax, [esp + 0x80]
push eax
call fcn.004aafd0
push esi
lea eax, [esp + 0x198]
push eax
lea eax, [esp + 0x8c]
push eax
call fcn.004aafd0
add esp, 0x18
lea eax, [esp + 0x74]
push eax
push dword [esp + 0x70]
lea eax, [esp + 0x80]
push eax
call fcn.004aad60
mov ecx, dword [esp + 0x7c]
add esp, 0xc
test ecx, ecx
je 0x498095
mov eax, dword [esp + 0x74]
mov dword [ecx], eax
lea eax, [esp + 0x78]
push eax
call fcn.004aafe0
add esp, 4
mov ecx, dword [esp + 0x34c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041ea4f
mov esp, ebp
pop ebp
ret