Function at 0x502bd0
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.0047c8f0
xor edi, edi
mov dword [ebp - 0x18], eax
push eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x10], edi
call fcn.00502ad0
push dword [ebp + 0xc]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
call fcn.0044ce10
add esp, 0xc
mov dword [ebp - 0x24], eax
xor esi, esi
mov dword [ebp - 0xc], edi
test ebx, ebx
je 0x502c70
test eax, eax
jle 0x502c70
mov eax, dword [ebp + 0x1c]
push dword [eax]
push 0xff
push dword [ebp + 0x18]
call fcn.0053daa0
push 0x5c28c8
push dword [ebp + 0x14]
lea eax, [ebp + 0x10]
push eax
push esi
call fcn.00483130
mov edi, eax
add esp, 0x1c
mov dword [ebp - 4], edi
test edi, edi
jne 0x502ce6
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.00455e30
add esp, 0x14
xor ebx, ebx
mov eax, dword [ebp + 0x1c]
push dword [eax]
push 0
push dword [ebp + 0x18]
call fcn.0053daa0
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.00456390
push 0x181
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push dword [ebp - 0x10]
call fcn.00456390
push 0x182
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push ebx
call fcn.00456390
push dword [ebp - 0x20]
call fcn.004b06b0
push dword [ebp - 0x14]
call fcn.004c8760
push 0x5c28c8
push edi
call fcn.00482d90
push esi
call fcn.004613a0
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 0x502d01
push 0x12b
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x68
jmp 0x502c64
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.004c8950
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x502d3e
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.00455e30
mov edi, dword [ebp - 4]
jmp 0x502c6d
push eax
call fcn.004c8a40
push dword [ebp - 0x14]
call fcn.004c87f0
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call fcn.004c87f0
add esp, 0xc
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x502d7e
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.00455e30
mov edi, dword [ebp - 4]
jmp 0x502c6d
push 0x142
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push edi
call fcn.004565a0
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.004565a0
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.004565a0
add esp, 0x24
mov dword [ebp - 8], eax
cmp dword [ebp - 0xc], esi
je 0x5030e0
cmp dword [ebp - 0x10], esi
je 0x5030e0
test eax, eax
je 0x5030e0
push dword [ebp - 0x18]
call fcn.004b09e0
mov ecx, eax
add esp, 4
mov dword [ebp - 0x20], ecx
test ecx, ecx
jne 0x502e15
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.00455e30
mov edi, dword [ebp - 4]
add esp, 0x14
mov ebx, dword [ebp - 8]
jmp 0x502c72
mov eax, dword [ebp - 4]
push dword [ebp - 0x14]
push dword [eax + 4]
push dword [eax]
push ecx
push dword [ebp - 0x18]
call fcn.004b0b20
add esp, 0x14
test eax, eax
je 0x5030cf
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.0047c900
add esp, 4
push eax
mov eax, dword [ebp - 0x20]
push eax
push 0
push eax
push dword [ebp - 0x18]
call fcn.004b0990
add esp, 0x18
test eax, eax
je 0x5030cf
push dword [ebp - 0x14]
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call fcn.004b06e0
add esp, 0x14
test eax, eax
je 0x5030cf
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
push dword [ebp - 0x28]
call fcn.0049f230
add esp, 0xc
test eax, eax
js 0x5030be
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.0049f230
add esp, 0xc
test eax, eax
js 0x5030be
push dword [ebp + 0xc]
push 0
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x10]
push edi
push dword [ebp - 0xc]
call fcn.00501fd0
add esp, 0x1c
test eax, eax
je 0x5030be
xor esi, esi
test edi, edi
je 0x502fe2
mov edx, dword [ebp - 0xc]
cmp edi, 0x40
jb 0x502fb3
mov ecx, dword [ebp + 0x18]
lea eax, [edx - 1]
add eax, edi
cmp ecx, eax
ja 0x502f05
lea eax, [ecx - 1]
add eax, edi
cmp eax, edx
jae 0x502fb3
lea eax, [ebx - 1]
add eax, edi
cmp ecx, eax
ja 0x502f1b
lea eax, [ecx - 1]
add eax, edi
cmp eax, ebx
jae 0x502fb3
mov eax, edi
and eax, 0x8000003f
jns 0x502f29
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 0x502f53
mov ebx, dword [ebp - 0x40]
mov edx, dword [ebp - 0xc]
cmp esi, edi
je 0x502fe2
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 0x502fd0
call fcn.004613c0
mov esi, eax
test esi, esi
jne 0x502ff7
push 0x167
jmp 0x502df7
push dword [ebp + 0xc]
push esi
call fcn.00460eb0
add esp, 8
test eax, eax
je 0x50309b
mov ebx, dword [ebp - 0x1c]
push ebx
push dword [ebp - 0x10]
push esi
call fcn.00461070
add esp, 0xc
test eax, eax
je 0x50309b
push edi
push dword [ebp + 0x18]
push esi
call fcn.00461070
add esp, 0xc
test eax, eax
je 0x50309b
push ebx
push dword [ebp - 0x44]
push esi
call fcn.00461070
mov ebx, dword [ebp - 8]
add esp, 0xc
test eax, eax
je 0x50309e
push 0
push ebx
push esi
call fcn.00460d70
add esp, 0xc
test eax, eax
je 0x50309e
push dword [ebp - 0x24]
push dword [ebp - 0x48]
push ebx
call fcn.00457c70
add esp, 0xc
test eax, eax
je 0x503087
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.00455e30
mov edi, dword [ebp - 4]
add esp, 0x14
jmp 0x502c72
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x30], 1
mov dword [eax], edi
mov edi, dword [ebp - 4]
jmp 0x502c84
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.00455e30
mov edi, dword [ebp - 4]
add esp, 0x14
jmp 0x502c72
push 0x15e
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x44
jmp 0x502dfe
push 0x156
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_sm2_sm2_crypt.c
push 0x10
jmp 0x502dfe
push 0x147
jmp 0x502df7