Function at 0x504980
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
push edi
mov dword [ebp - 0x34], 0
xor ebx, ebx
call fcn.00462c30
mov esi, dword [ebp + 8]
push esi
mov dword [ebp - 0xc], eax
call fcn.0047e160
mov edi, eax
push edi
call fcn.004b1810
push esi
mov dword [ebp - 0x38], eax
call fcn.0047e180
push dword [ebp + 0xc]
mov dword [ebp - 0x3c], eax
xor esi, esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
call fcn.0044e690
add esp, 0x10
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
cmp dword [ebp - 0xc], ebx
je 0x504e15
test eax, eax
jle 0x504e15
push edi
call fcn.00504360
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x504a04
push 0x93
jmp 0x504e1a
push edi
call fcn.004b2260
push edi
mov dword [ebp - 0x10], eax
call fcn.004b2260
add esp, 8
mov dword [ebp - 0x14], eax
call fcn.004ca1e0
mov ebx, eax
cmp dword [ebp - 0x10], esi
je 0x504e07
cmp dword [ebp - 0x14], esi
je 0x504e07
test ebx, ebx
je 0x504e07
push ebx
call fcn.004ca2d0
push ebx
call fcn.004ca080
push ebx
mov dword [ebp - 4], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0x28], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0x20], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0x2c], eax
call fcn.004ca080
add esp, 0x18
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x504a85
push 0xa7
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 3
jmp 0x504e21
mov eax, dword [ebp - 0x1c]
push 0xab
add eax, eax
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push eax
mov dword [ebp - 0x40], eax
call fcn.00457e10
push 0xac
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push dword [ebp - 0x30]
mov dword [ebp - 8], eax
call fcn.00457e10
add esp, 0x18
mov dword [ebp - 0x18], eax
cmp dword [ebp - 8], esi
je 0x504df9
test eax, eax
je 0x504df9
mov eax, dword [ebp + 0x1c]
push dword [eax]
push 0
push dword [ebp + 0x18]
call fcn.0053f310
push dword [ebp - 0x38]
push dword [ebp - 4]
call fcn.004ca5a0
add esp, 0x14
test eax, eax
jne 0x504af4
push 0xb6
jmp 0x504e1a
push ebx
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 0x10]
push edi
call fcn.004b2210
add esp, 0x18
test eax, eax
je 0x504deb
push ebx
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
push dword [ebp - 0x10]
push edi
call fcn.004b1f60
add esp, 0x14
test eax, eax
je 0x504deb
push ebx
push dword [ebp - 4]
push dword [ebp - 0x3c]
push 0
push dword [ebp - 0x14]
push edi
call fcn.004b2210
add esp, 0x18
test eax, eax
je 0x504deb
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
push edi
call fcn.004b1f60
add esp, 0x14
test eax, eax
je 0x504deb
mov edi, dword [ebp - 0x1c]
push edi
push dword [ebp - 8]
push dword [ebp - 0x20]
call fcn.004a0aa0
add esp, 0xc
test eax, eax
js 0x504de4
mov eax, dword [ebp - 8]
add eax, edi
push edi
push eax
push dword [ebp - 0x24]
mov dword [ebp - 0x38], eax
call fcn.004a0aa0
add esp, 0xc
test eax, eax
js 0x504de4
mov edi, dword [ebp + 0x14]
push 0xc8
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push edi
call fcn.00457e10
add esp, 0xc
mov dword [ebp - 4], eax
test eax, eax
jne 0x504bd4
push 0xca
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x41
push 0x67
push 0x35
call fcn.004576a0
mov esi, dword [ebp - 4]
jmp 0x504e2a
push dword [ebp + 0xc]
push 0
push 0
push dword [ebp - 0x40]
push dword [ebp - 8]
push edi
push eax
call fcn.00503860
add esp, 0x1c
test eax, eax
jne 0x504c0c
push 0xd1
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 6
push 0x67
push 0x35
call fcn.004576a0
mov esi, dword [ebp - 4]
jmp 0x504e2a
xor esi, esi
test edi, edi
je 0x504cc7
mov edx, dword [ebp - 4]
cmp edi, 0x40
jb 0x504ca1
mov ecx, dword [ebp + 0x10]
lea eax, [ecx - 1]
add eax, edi
cmp edx, eax
ja 0x504c37
lea eax, [edx - 1]
add eax, edi
cmp eax, ecx
jae 0x504ca1
mov eax, edi
mov edi, ecx
and eax, 0xffffffc0
sub edi, edx
mov dword [ebp - 0x40], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x3c], eax
mov eax, edx
mov edx, dword [ebp - 0x40]
nop
movups xmm0, xmmword [eax]
lea eax, [eax + 0x40]
movups xmm1, xmmword [edx + eax - 0x40]
pxor xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movups xmm0, xmmword [eax - 0x30]
movups xmm1, xmmword [ecx + esi + 0x10]
pxor xmm1, xmm0
movups xmmword [eax - 0x30], xmm1
movups xmm0, xmmword [eax - 0x20]
movups xmm1, xmmword [ecx + esi + 0x20]
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
movups xmm0, xmmword [eax - 0x10]
movups xmm1, xmmword [ecx + esi + 0x30]
add esi, 0x40
pxor xmm1, xmm0
movups xmmword [eax - 0x10], xmm1
cmp esi, dword [ebp - 0x3c]
jne 0x504c50
mov edx, dword [ebp - 4]
cmp esi, edi
je 0x504cc7
mov eax, dword [ebp + 0x10]
lea ecx, [esi + edx]
sub eax, edx
mov edx, edi
mov dword [ebp - 0x40], eax
sub edx, esi
mov edi, eax
mov al, byte [ecx + edi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub edx, 1
jne 0x504cb6
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
mov esi, dword [ebp - 0xc]
push esi
call fcn.00462720
add esp, 8
test eax, eax
je 0x504dca
mov esi, dword [ebp - 0x1c]
push esi
push dword [ebp - 8]
push dword [ebp - 0xc]
call fcn.004628e0
add esp, 0xc
test eax, eax
je 0x504dca
push edi
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call fcn.004628e0
add esp, 0xc
test eax, eax
je 0x504dca
push esi
push dword [ebp - 0x38]
mov esi, dword [ebp - 0xc]
push esi
call fcn.004628e0
add esp, 0xc
test eax, eax
je 0x504dca
push 0
push dword [ebp - 0x18]
push esi
call fcn.004625e0
add esp, 0xc
test eax, eax
je 0x504dca
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x4c], eax
call fcn.00483be0
mov dword [ebp - 0x48], eax
call fcn.00483be0
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x504dc0
test eax, eax
je 0x504dc0
push dword [ebp - 0x30]
push dword [ebp - 0x18]
push ecx
call fcn.004a5420
mov esi, dword [ebp - 4]
add esp, 0xc
test eax, eax
je 0x504db9
push edi
push esi
push dword [ebp - 0x44]
call fcn.004a5420
add esp, 0xc
test eax, eax
je 0x504db9
push 0x5c5eb8
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00486350
add esp, 0xc
test eax, eax
jns 0x504dab
push 0xf3
jmp 0x504e1a
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x34], 1
mov dword [ecx], eax
jmp 0x504e2d
push 0xec
jmp 0x504e1a
push 0xe7
jmp 0x504bbc
push 0xdd
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 6
push 0x67
push 0x35
call fcn.004576a0
mov esi, dword [ebp - 4]
jmp 0x504e2a
push 0xc4
jmp 0x504e1a
push 0xbe
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x10
jmp 0x504e21
push 0xaf
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x41
jmp 0x504e21
push 0x9b
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x41
jmp 0x504e21
push 0x8d
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x44
push 0x67
push 0x35
call fcn.004576a0
add esp, 0x14
push dword [ebp - 0x44]
call fcn.00483bc0
push dword [ebp - 0x48]
call fcn.00483bc0
push 0xfd
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push esi
call fcn.00457c00
push 0xfe
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push dword [ebp - 8]
call fcn.00457c00
push 0xff
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push dword [ebp - 0x18]
call fcn.00457c00
push dword [ebp - 0xc]
call fcn.00462c10
push ebx
call fcn.004c9ff0
push dword [ebp - 0x10]
call fcn.004b1f30
push dword [ebp - 0x14]
call fcn.004b1f30
mov eax, dword [ebp - 0x34]
add esp, 0x3c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret