Function at 0x5f2140
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
xor esi, esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 8]
push esi
push eax
push 0x1b
push edi
mov dword [ebp - 4], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 8], esi
call fcn.005ebaf0
add esp, 0x10
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x5f2456
mov ecx, dword [edi + 0x118]
mov edx, dword [ebp - 8]
push ebx
push ecx
push 1
push edx
call fcn.0058f280
mov eax, dword [edi + 0xfc]
mov ecx, dword [ebp - 8]
push eax
push 2
push ecx
call fcn.0058f280
mov eax, dword [ebp - 4]
add esp, 0x18
cmp eax, esi
jne 0x5f220a
jmp 0x5f21ad
xor esi, esi
mov edx, dword [ebp - 8]
push edx
call fcn.0058daf0
add esp, 4
cmp eax, 0x64
jne 0x5f220a
mov eax, dword [ebp - 8]
push esi
push eax
call fcn.0058ecf0
mov ebx, eax
mov eax, dword [edi + 0xfc]
add esp, 8
test eax, eax
jle 0x5f2201
lea ecx, [ebp - 4]
push ecx
push esi
push ebx
push edi
call fcn.005f2530
mov ecx, dword [ebp - 0x3c]
add esp, 0x10
xor ecx, eax
mov eax, dword [ebp - 0x38]
xor eax, edx
inc esi
mov dword [ebp - 0x38], eax
mov eax, dword [edi + 0xfc]
cmp esi, eax
mov dword [ebp - 0x3c], ecx
jl 0x5f21d7
mov eax, dword [ebp - 4]
test eax, eax
je 0x5f21ab
xor esi, esi
mov edx, dword [ebp - 8]
push edx
call fcn.0058c5f0
mov ecx, eax
mov eax, dword [ebp - 4]
add esp, 4
cmp eax, esi
jne 0x5f2441
mov eax, ecx
cmp ecx, esi
mov dword [ebp - 4], eax
jne 0x5f2441
mov eax, dword [edi + 0x24]
mov edx, dword [edi + 0xdc]
push edx
push str.SELECT__s
mov ecx, dword [eax]
mov dword [ebp + 8], esi
mov dword [ebp - 0x24], ecx
call fcn.0057aa30
mov esi, eax
add esp, 8
test esi, esi
jne 0x5f2261
mov dword [ebp - 4], 7
jmp 0x5f2430
mov ecx, dword [edi + 0xc]
lea eax, [ebp + 8]
push 0
push eax
push 0xffffffffffffffff
push esi
push ecx
call fcn.005aea20
push esi
mov dword [ebp - 4], eax
call fcn.00578d00
mov eax, dword [ebp - 4]
add esp, 0x18
test eax, eax
jne 0x5f2430
mov edx, dword [ebp + 8]
push edx
call fcn.0058daf0
add esp, 4
cmp eax, 0x64
jne 0x5f2430
mov eax, dword [ebp + 8]
push 0
push eax
call fcn.0058ed20
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x44], eax
push ecx
push edi
mov dword [ebp - 0x40], edx
call fcn.005f1f40
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
add esp, 0x10
xor ebx, ebx
test eax, eax
jne 0x5f2430
cmp ebx, dword [edi + 0x18]
jge 0x5f228a
mov edx, dword [edi + 0x20]
cmp byte [edx + ebx], 0
jne 0x5f2427
mov eax, dword [ebp + 8]
lea esi, [ebx + 1]
push esi
push eax
call fcn.0058ed50
mov ecx, dword [ebp + 8]
push esi
push ecx
mov dword [ebp - 0x18], eax
call fcn.0058ec60
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x1c]
push edx
mov edx, dword [edi + 0x24]
push eax
mov eax, dword [ebp - 0x18]
push eax
xor esi, esi
push ecx
push edx
mov dword [ebp - 0x1c], esi
call fcn.005e9480
add esp, 0x24
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x5f2409
jmp 0x5f2326
xor esi, esi
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x28]
push eax
lea edx, [ebp - 0x2c]
push ecx
lea eax, [ebp - 0xc]
push edx
mov edx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x24]
push ecx
push edx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x10], esi
call dword [eax + 0x14]
add esp, 0x18
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x5f2409
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x44]
push ecx
mov ecx, dword [ebp - 0x14]
push ebx
push edx
mov edx, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x20]
push esi
push ecx
push edx
push eax
call fcn.005f2480
mov esi, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
xor esi, eax
mov eax, dword [edi + 0xfc]
mov dword [ebp - 0x34], esi
mov esi, 1
add esp, 0x20
xor ecx, edx
cmp eax, esi
mov dword [ebp - 0x30], ecx
jle 0x5f23fc
mov dword [ebp - 0x18], 0x18
mov ecx, dword [edi + 0x100]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx]
mov ecx, dword [ebp - 0xc]
cmp eax, ecx
jg 0x5f23e8
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x40]
push ecx
mov ecx, dword [ebp - 0x44]
push ebx
push edx
mov edx, dword [ebp - 0x14]
push ecx
push esi
push edx
push eax
mov eax, dword [ebp - 0x20]
push eax
call fcn.005f2480
mov ecx, dword [ebp - 0x34]
add esp, 0x20
xor ecx, eax
mov eax, dword [ebp - 0x30]
xor eax, edx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [edi + 0xfc]
inc esi
add ecx, 0x18
cmp esi, eax
mov dword [ebp - 0x18], ecx
jl 0x5f23a6
mov eax, dword [ebp - 4]
test eax, eax
je 0x5f2324
xor esi, esi
mov ecx, dword [ebp - 0x1c]
cmp ecx, esi
je 0x5f241d
push ecx
mov ecx, dword [ebp - 0x24]
call dword [ecx + 0x10]
mov eax, dword [ebp - 4]
add esp, 4
cmp eax, 0x65
jne 0x5f2427
xor eax, eax
mov dword [ebp - 4], eax
inc ebx
test eax, eax
je 0x5f22cd
mov edx, dword [ebp + 8]
push edx
call fcn.0058a550
mov eax, dword [ebp - 4]
add esp, 4
xor esi, esi
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x3c]
cmp edx, ecx
pop ebx
jne 0x5f2466
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
cmp ecx, edx
jne 0x5f2466
mov edx, dword [ebp + 0xc]
mov ecx, 1
pop edi
pop esi
mov dword [edx], ecx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor ecx, ecx
pop edi
pop esi
mov dword [edx], ecx
mov esp, ebp
pop ebp
ret