Function at 0x59e330
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov esi, dword [ecx]
test esi, esi
setne dl
test eax, eax
setne cl
and cl, dl
cmp dword [esp + 0x30], 0
mov ebp, dword [esp + 0x18]
je 0x59e492
test cl, cl
je 0x59e5db
nop word cs:[eax + eax]
mov edx, dword [esp + 0x28]
movzx ecx, byte [edx + esi]
xor cl, byte [ebp]
inc ebp
mov byte [edx + esi], cl
mov byte [ebx], cl
inc ebx
lea ecx, [eax - 1]
inc esi
and esi, 0xf
je 0x59e392
cmp eax, 1
mov eax, ecx
jne 0x59e370
cmp ecx, 0x10
jb 0x59e5e6
mov dword [esp], ecx
push dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
push eax
push eax
call fcn.00599480
add esp, 0xc
cmp esi, 0xf
ja 0x59e411
mov eax, dword [ebp + esi]
mov ecx, dword [esp + 0x28]
xor eax, dword [ecx + esi]
mov dword [ecx + esi], eax
mov dword [ebx + esi], eax
cmp esi, 0xb
ja 0x59e411
mov eax, dword [ebp + esi + 4]
mov ecx, dword [esp + 0x28]
xor eax, dword [ecx + esi + 4]
mov dword [ecx + esi + 4], eax
mov dword [ebx + esi + 4], eax
cmp esi, 7
ja 0x59e411
mov eax, dword [ebp + esi + 8]
mov ecx, dword [esp + 0x28]
xor eax, dword [ecx + esi + 8]
mov dword [ecx + esi + 8], eax
mov dword [ebx + esi + 8], eax
cmp esi, 3
ja 0x59e411
mov eax, dword [ebp + esi + 0xc]
mov ecx, dword [esp + 0x28]
xor eax, dword [ecx + esi + 0xc]
mov dword [ecx + esi + 0xc], eax
mov dword [ebx + esi + 0xc], eax
mov ecx, dword [esp]
add ecx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
xor esi, esi
cmp ecx, 0x10
mov eax, dword [esp + 0x24]
jb 0x59e485
nop dword [eax + eax]
mov dword [esp], ecx
push eax
mov edi, dword [esp + 0x2c]
push edi
push edi
call fcn.00599480
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov eax, dword [ebp]
xor eax, dword [edi]
mov dword [edi], eax
mov dword [ebx], eax
mov eax, dword [ebp + 4]
xor eax, dword [edi + 4]
mov dword [edi + 4], eax
mov dword [ebx + 4], eax
mov eax, dword [ebp + 8]
xor eax, dword [edi + 8]
mov dword [edi + 8], eax
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0xc]
xor eax, dword [edi + 0xc]
mov dword [edi + 0xc], eax
mov dword [ebx + 0xc], eax
mov eax, dword [esp + 0x24]
add ecx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
cmp ecx, 0xf
ja 0x59e430
test ecx, ecx
jne 0x59e5f2
jmp 0x59e6aa
test cl, cl
je 0x59e672
nop word [eax + eax]
movzx ecx, byte [ebp]
inc ebp
mov edi, dword [esp + 0x28]
movzx edx, byte [edi + esi]
xor dl, cl
mov byte [ebx], dl
inc ebx
mov byte [edi + esi], cl
lea edx, [eax - 1]
inc esi
and esi, 0xf
je 0x59e4c5
cmp eax, 1
mov eax, edx
jne 0x59e4a0
cmp edx, 0x10
jb 0x59e67d
mov dword [esp], edx
push dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
push eax
push eax
call fcn.00599480
add esp, 0xc
cmp esi, 0xf
ja 0x59e54c
mov eax, dword [ebp + esi]
mov edx, dword [esp + 0x28]
mov ecx, dword [edx + esi]
xor ecx, eax
mov dword [ebx + esi], ecx
mov dword [edx + esi], eax
cmp esi, 0xb
ja 0x59e54c
mov eax, dword [ebp + esi + 4]
mov edx, dword [esp + 0x28]
mov ecx, dword [edx + esi + 4]
xor ecx, eax
mov dword [ebx + esi + 4], ecx
mov dword [edx + esi + 4], eax
cmp esi, 7
ja 0x59e54c
mov eax, dword [ebp + esi + 8]
mov edx, dword [esp + 0x28]
mov ecx, dword [edx + esi + 8]
xor ecx, eax
mov dword [ebx + esi + 8], ecx
mov dword [edx + esi + 8], eax
cmp esi, 3
ja 0x59e54c
mov eax, dword [ebp + esi + 0xc]
mov edx, dword [esp + 0x28]
mov ecx, dword [edx + esi + 0xc]
xor ecx, eax
mov dword [ebx + esi + 0xc], ecx
mov dword [edx + esi + 0xc], eax
mov edx, dword [esp]
add edx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
xor esi, esi
cmp edx, 0x10
mov eax, dword [esp + 0x24]
jb 0x59e5ce
nop word cs:[eax + eax]
push eax
mov eax, dword [esp + 0x2c]
push eax
push eax
mov edi, edx
call fcn.00599480
mov edx, edi
mov edi, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [ebp]
mov ecx, dword [edi]
xor ecx, eax
mov dword [ebx], ecx
mov dword [edi], eax
mov eax, dword [ebp + 4]
mov ecx, dword [edi + 4]
xor ecx, eax
mov dword [ebx + 4], ecx
mov dword [edi + 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [edi + 8]
xor ecx, eax
mov dword [ebx + 8], ecx
mov dword [edi + 8], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi + 0xc]
xor ecx, eax
mov dword [ebx + 0xc], ecx
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x24]
add edx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
cmp edx, 0xf
ja 0x59e570
test edx, edx
jne 0x59e685
jmp 0x59e6aa
mov ecx, eax
cmp ecx, 0x10
jae 0x59e39b
mov eax, dword [esp + 0x24]
test ecx, ecx
je 0x59e6aa
push eax
mov eax, dword [esp + 0x2c]
push eax
push eax
mov edi, ecx
call fcn.00599480
mov edx, edi
add esp, 0xc
test dl, 1
jne 0x59e616
mov ecx, edx
cmp edx, 1
jne 0x59e640
jmp 0x59e712
lea ecx, [edx - 1]
mov edi, dword [esp + 0x28]
movzx eax, byte [edi + esi]
xor al, byte [ebp + esi]
mov byte [edi + esi], al
mov byte [ebx + esi], al
inc esi
mov eax, esi
cmp edx, 1
je 0x59e712
nop word [eax + eax]
mov edi, dword [esp + 0x28]
movzx eax, byte [edi + esi]
xor al, byte [ebp + esi]
mov byte [edi + esi], al
mov byte [ebx + esi], al
movzx edx, byte [edi + esi + 1]
xor dl, byte [ebp + esi + 1]
lea eax, [esi + 2]
mov byte [edi + esi + 1], dl
mov byte [ebx + esi + 1], dl
mov esi, eax
add ecx, 0xfffffffe
jne 0x59e640
jmp 0x59e712
mov edx, eax
cmp edx, 0x10
jae 0x59e4ce
mov eax, dword [esp + 0x24]
test edx, edx
je 0x59e6aa
push eax
mov eax, dword [esp + 0x2c]
push eax
push eax
mov dword [esp + 0xc], edx
call fcn.00599480
mov edx, dword [esp + 0xc]
add esp, 0xc
test dl, 1
jne 0x59e6ae
mov ecx, edx
cmp edx, 1
jne 0x59e6e0
jmp 0x59e712
mov eax, esi
jmp 0x59e712
lea ecx, [edx - 1]
movzx eax, byte [ebp + esi]
mov edi, dword [esp + 0x28]
movzx edx, byte [edi + esi]
xor dl, al
mov byte [ebx + esi], dl
mov edx, dword [esp]
mov byte [edi + esi], al
inc esi
mov eax, esi
cmp edx, 1
je 0x59e712
nop word cs:[eax + eax]
movzx eax, byte [ebp + esi]
mov edi, dword [esp + 0x28]
movzx edx, byte [edi + esi]
xor dl, al
mov byte [ebx + esi], dl
mov byte [edi + esi], al
movzx edx, byte [ebp + esi + 1]
mov dh, byte [edi + esi + 1]
xor dh, dl
lea eax, [esi + 2]
mov byte [ebx + esi + 1], dh
mov byte [edi + esi + 1], dl
mov esi, eax
add ecx, 0xfffffffe
jne 0x59e6e0
mov ecx, dword [esp + 0x2c]
mov dword [ecx], eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret