Function at 0x504460
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push dword [ebp + 8]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x14], 0
call fcn.0047e160
xor edi, edi
mov dword [ebp - 0x18], eax
push eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x10], edi
call fcn.00504360
push dword [ebp + 0xc]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
call fcn.0044e690
add esp, 0xc
mov dword [ebp - 0x24], eax
xor esi, esi
mov dword [ebp - 0xc], edi
test ebx, ebx
je 0x504500
test eax, eax
jle 0x504500
mov eax, dword [ebp + 0x1c]
push dword [eax]
push 0xff
push dword [ebp + 0x18]
call fcn.0053f310
push 0x5c5eb8
push dword [ebp + 0x14]
lea eax, [ebp + 0x10]
push eax
push esi
call fcn.004849a0
mov edi, eax
add esp, 0x1c
mov dword [ebp - 4], edi
test edi, edi
jne 0x504576
push 0x126
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x64
push 0x66
push 0x35
call fcn.004576a0
add esp, 0x14
xor ebx, ebx
mov eax, dword [ebp + 0x1c]
push dword [eax]
push 0
push dword [ebp + 0x18]
call fcn.0053f310
add esp, 0xc
push 0x180
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push dword [ebp - 0xc]
call fcn.00457c00
push 0x181
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push dword [ebp - 0x10]
call fcn.00457c00
push 0x182
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push ebx
call fcn.00457c00
push dword [ebp - 0x20]
call fcn.004b1f30
push dword [ebp - 0x14]
call fcn.004c9ff0
push 0x5c5eb8
push edi
call fcn.00484600
push esi
call fcn.00462c10
mov eax, dword [ebp - 0x30]
add esp, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 8]
mov eax, dword [ebp - 0x24]
cmp dword [ecx], eax
je 0x504591
push 0x12b
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x68
jmp 0x5044f4
mov eax, dword [edi + 0xc]
mov ecx, dword [ecx + 8]
mov dword [ebp - 0x48], ecx
mov ebx, dword [eax + 8]
mov edi, dword [eax]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], edi
call fcn.004ca1e0
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x5045ce
push 0x135
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x41
push 0x66
push 0x35
call fcn.004576a0
mov edi, dword [ebp - 4]
jmp 0x5044fd
push eax
call fcn.004ca2d0
push dword [ebp - 0x14]
call fcn.004ca080
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call fcn.004ca080
add esp, 0xc
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x50460e
push 0x13e
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 3
push 0x66
push 0x35
call fcn.004576a0
mov edi, dword [ebp - 4]
jmp 0x5044fd
push 0x142
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push edi
call fcn.00457e10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
push 0x143
add eax, eax
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push eax
mov dword [ebp - 0x34], eax
call fcn.00457e10
push 0x144
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
call fcn.00457e10
add esp, 0x24
mov dword [ebp - 8], eax
cmp dword [ebp - 0xc], esi
je 0x504970
cmp dword [ebp - 0x10], esi
je 0x504970
test eax, eax
je 0x504970
push dword [ebp - 0x18]
call fcn.004b2260
mov ecx, eax
add esp, 4
mov dword [ebp - 0x20], ecx
test ecx, ecx
jne 0x5046a5
push 0x14d
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x41
push 0x66
push 0x35
call fcn.004576a0
mov edi, dword [ebp - 4]
add esp, 0x14
mov ebx, dword [ebp - 8]
jmp 0x504502
mov eax, dword [ebp - 4]
push dword [ebp - 0x14]
push dword [eax + 4]
push dword [eax]
push ecx
push dword [ebp - 0x18]
call fcn.004b23a0
add esp, 0x14
test eax, eax
je 0x50495f
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.0047e170
add esp, 4
push eax
mov eax, dword [ebp - 0x20]
push eax
push 0
push eax
push dword [ebp - 0x18]
call fcn.004b2210
add esp, 0x18
test eax, eax
je 0x50495f
push dword [ebp - 0x14]
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call fcn.004b1f60
add esp, 0x14
test eax, eax
je 0x50495f
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
push dword [ebp - 0x28]
call fcn.004a0aa0
add esp, 0xc
test eax, eax
js 0x50494e
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
add ecx, eax
push eax
push ecx
push dword [ebp - 0x2c]
mov dword [ebp - 0x44], ecx
call fcn.004a0aa0
add esp, 0xc
test eax, eax
js 0x50494e
push dword [ebp + 0xc]
push 0
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x10]
push edi
push dword [ebp - 0xc]
call fcn.00503860
add esp, 0x1c
test eax, eax
je 0x50494e
xor esi, esi
test edi, edi
je 0x504872
mov edx, dword [ebp - 0xc]
cmp edi, 0x40
jb 0x504843
mov ecx, dword [ebp + 0x18]
lea eax, [edx - 1]
add eax, edi
cmp ecx, eax
ja 0x504795
lea eax, [ecx - 1]
add eax, edi
cmp eax, edx
jae 0x504843
lea eax, [ebx - 1]
add eax, edi
cmp ecx, eax
ja 0x5047ab
lea eax, [ecx - 1]
add eax, edi
cmp eax, ebx
jae 0x504843
mov eax, edi
and eax, 0x8000003f
jns 0x5047b9
dec eax
or eax, 0xffffffc0
inc eax
mov dword [ebp - 0x18], edi
add ecx, 0x10
sub dword [ebp - 0x18], eax
mov edi, ebx
sub edi, edx
mov eax, edx
mov dword [ebp - 0x34], edi
mov edi, dword [ebp + 0x18]
sub edi, edx
mov edx, ebx
sub edx, dword [ebp + 0x18]
mov dword [ebp - 0x28], edx
lea edx, [ebx + 0x30]
mov dword [ebp - 0x38], edx
mov ebx, edi
mov edx, dword [ebp - 0x34]
movups xmm0, xmmword [eax]
mov edi, dword [ebp - 0x28]
lea eax, [eax + 0x40]
movups xmm1, xmmword [edx + eax - 0x40]
lea ecx, [ecx + 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x30]
movups xmmword [ebx + eax - 0x40], xmm1
movups xmm1, xmmword [edi + ecx - 0x40]
mov edi, dword [ebp - 0x38]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x20]
movups xmmword [ecx - 0x40], xmm1
movups xmm1, xmmword [edi + esi - 0x10]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x10]
movups xmmword [ecx - 0x30], xmm1
movups xmm1, xmmword [edi + esi]
mov edi, dword [ebp - 0x3c]
add esi, 0x40
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
cmp esi, dword [ebp - 0x18]
jne 0x5047e3
mov ebx, dword [ebp - 0x40]
mov edx, dword [ebp - 0xc]
cmp esi, edi
je 0x504872
mov eax, dword [ebp + 0x18]
lea ecx, [esi + edx]
sub eax, edx
sub ebx, edx
mov edx, edi
mov dword [ebp - 0x40], eax
sub edx, esi
mov esi, eax
nop word [eax + eax]
mov al, byte [ecx + ebx]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [ecx + esi - 1], al
sub edx, 1
jne 0x504860
call fcn.00462c30
mov esi, eax
test esi, esi
jne 0x504887
push 0x167
jmp 0x504687
push dword [ebp + 0xc]
push esi
call fcn.00462720
add esp, 8
test eax, eax
je 0x50492b
mov ebx, dword [ebp - 0x1c]
push ebx
push dword [ebp - 0x10]
push esi
call fcn.004628e0
add esp, 0xc
test eax, eax
je 0x50492b
push edi
push dword [ebp + 0x18]
push esi
call fcn.004628e0
add esp, 0xc
test eax, eax
je 0x50492b
push ebx
push dword [ebp - 0x44]
push esi
call fcn.004628e0
mov ebx, dword [ebp - 8]
add esp, 0xc
test eax, eax
je 0x50492e
push 0
push ebx
push esi
call fcn.004625e0
add esp, 0xc
test eax, eax
je 0x50492e
push dword [ebp - 0x24]
push dword [ebp - 0x48]
push ebx
call fcn.004594e0
add esp, 0xc
test eax, eax
je 0x504917
push 0x175
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x66
push 0x66
push 0x35
call fcn.004576a0
mov edi, dword [ebp - 4]
add esp, 0x14
jmp 0x504502
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x30], 1
mov dword [eax], edi
mov edi, dword [ebp - 4]
jmp 0x504514
mov ebx, dword [ebp - 8]
push 0x170
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 6
push 0x66
push 0x35
call fcn.004576a0
mov edi, dword [ebp - 4]
add esp, 0x14
jmp 0x504502
push 0x15e
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x44
jmp 0x50468e
push 0x156
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x10
jmp 0x50468e
push 0x147
jmp 0x504687