Function at 0x59be10
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x30
call fcn.005b2630
mov eax, dword [esp + 0x34]
push ebx
push ebp
push esi
push edi
xor edi, edi
push eax
mov dword [esp + 0x40], edi
xor ebx, ebx
call fcn.004df1e0
mov esi, eax
push esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x28], edi
call fcn.0059b7d0
mov ecx, dword [esp + 0x50]
push ecx
mov ebp, eax
call fcn.004a6d50
add esp, 0xc
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], ebx
test ebp, ebp
je 0x59c198
test eax, eax
jle 0x59c198
mov edx, dword [esp + 0x58]
mov eax, dword [edx]
mov ecx, dword [esp + 0x54]
push eax
push 0xff
push ecx
call sub.MSVCR100.dll_memset
mov edx, dword [esp + 0x5c]
push 0x627380
push edx
lea eax, [esp + 0x60]
push eax
push ebx
call fcn.004d4ff0
add esp, 0x1c
mov dword [esp + 0x24], eax
test eax, eax
jne 0x59beb6
push 0x126
push str.crypto_sm2_sm2_crypt.c
push 0x64
jmp 0x59c18c
mov ecx, dword [eax + 8]
mov edx, dword [esp + 0x1c]
cmp dword [ecx], edx
je 0x59bed2
push 0x12b
push str.crypto_sm2_sm2_crypt.c
push 0x68
jmp 0x59c18c
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 8]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x34], edx
mov edx, dword [eax]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x10], edx
call fcn.00529c50
mov ebx, eax
test ebx, ebx
jne 0x59befe
push 0x135
jmp 0x59c185
push ebx
call fcn.00529d40
push ebx
call fcn.00529dd0
push ebx
mov dword [esp + 0x34], eax
call fcn.00529dd0
add esp, 0xc
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x59bf30
push 0x13e
push str.crypto_sm2_sm2_crypt.c
push 3
jmp 0x59c18c
mov eax, dword [esp + 0x10]
push 0x142
push str.crypto_sm2_sm2_crypt.c
push eax
call fcn.0048fb90
push 0x143
mov edi, eax
lea eax, [ebp + ebp]
push str.crypto_sm2_sm2_crypt.c
push eax
call fcn.0048fb90
mov ecx, dword [esp + 0x34]
push 0x144
push str.crypto_sm2_sm2_crypt.c
push ecx
mov dword [esp + 0x38], eax
call fcn.0048fb90
add esp, 0x24
mov dword [esp + 0x20], eax
test edi, edi
je 0x59c180
cmp dword [esp + 0x14], 0
je 0x59c180
test eax, eax
je 0x59c180
push esi
call fcn.004df390
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x59bfaf
push 0x14d
jmp 0x59c185
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
push ebx
push edx
push ecx
push eax
push esi
call fcn.004e0670
add esp, 0x14
test eax, eax
je 0x59c172
mov edx, dword [esp + 0x44]
push ebx
push edx
call fcn.0050d160
add esp, 4
push eax
mov eax, dword [esp + 0x20]
push eax
push 0
push eax
push esi
call fcn.004dfca0
add esp, 0x18
test eax, eax
je 0x59c172
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
push ebx
push eax
push ecx
push edx
push esi
call fcn.004e0740
add esp, 0x14
test eax, eax
je 0x59c172
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
push ebp
push esi
push eax
call fcn.004f3280
add esp, 0xc
test eax, eax
js 0x59c164
mov ecx, dword [esp + 0x2c]
lea eax, [esi + ebp]
push ebp
push eax
push ecx
mov dword [esp + 0x34], eax
call fcn.004f3280
add esp, 0xc
test eax, eax
js 0x59c164
mov edx, dword [esp + 0x48]
push edx
push 0
push 0
lea eax, [ebp + ebp]
push eax
push esi
mov esi, dword [esp + 0x24]
push esi
push edi
call fcn.005a0990
add esp, 0x1c
test eax, eax
je 0x59c164
test esi, esi
je 0x59c0a0
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x54]
mov edx, dword [esp + 0x10]
sub ecx, edi
mov eax, edi
sub esi, edi
mov dword [esp + 0x2c], edx
mov edi, edi
mov dl, byte [ecx + eax]
xor dl, byte [eax]
inc eax
dec dword [esp + 0x2c]
mov byte [esi + eax - 1], dl
jne 0x59c090
call fcn.004ba1a0
mov esi, eax
mov dword [esp + 0x30], esi
test esi, esi
jne 0x59c0b9
push 0x167
jmp 0x59c185
mov eax, dword [esp + 0x48]
push eax
push esi
call fcn.004ba710
add esp, 8
test eax, eax
je 0x59c156
mov ecx, dword [esp + 0x14]
push ebp
push ecx
push esi
call fcn.004ba390
add esp, 0xc
test eax, eax
je 0x59c156
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x54]
push edx
push eax
push esi
call fcn.004ba390
add esp, 0xc
test eax, eax
je 0x59c156
mov ecx, dword [esp + 0x28]
push ebp
push ecx
push esi
call fcn.004ba390
add esp, 0xc
test eax, eax
je 0x59c156
mov ebp, dword [esp + 0x20]
push 0
push ebp
push esi
call fcn.004ba730
add esp, 0xc
test eax, eax
je 0x59c156
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
push edx
push eax
push ebp
call fcn.004a5bf0
add esp, 0xc
test eax, eax
je 0x59c145
push 0x175
push str.crypto_sm2_sm2_crypt.c
push 0x66
jmp 0x59c18c
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x10]
mov ebp, 1
mov dword [ecx], edx
jmp 0x59c1b6
push 0x170
push str.crypto_sm2_sm2_crypt.c
push 6
jmp 0x59c18c
push 0x15e
push str.crypto_sm2_sm2_crypt.c
push 0x44
jmp 0x59c18c
push 0x156
push str.crypto_sm2_sm2_crypt.c
push 0x10
jmp 0x59c18c
push 0x147
push str.crypto_sm2_sm2_crypt.c
push 0x41
push 0x66
push 0x35
call fcn.00486d00
add esp, 0x14
mov eax, dword [esp + 0x58]
mov ecx, dword [eax]
mov edx, dword [esp + 0x54]
push ecx
push 0
push edx
call sub.MSVCR100.dll_memset
mov esi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x48]
add esp, 0xc
push 0x180
push str.crypto_sm2_sm2_crypt.c
push edi
call fcn.0048fc00
mov eax, dword [esp + 0x20]
push 0x181
push str.crypto_sm2_sm2_crypt.c
push eax
call fcn.0048fc00
mov ecx, dword [esp + 0x38]
push 0x182
push str.crypto_sm2_sm2_crypt.c
push ecx
call fcn.0048fc00
mov edx, dword [esp + 0x3c]
push edx
call fcn.004df450
push ebx
call fcn.00529d00
mov eax, dword [esp + 0x50]
push 0x627380
push eax
call fcn.004d6880
push esi
call fcn.004ba1c0
add esp, 0x38
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x30
ret