Function at 0x59d760
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x3c
push ebx
push ebp
mov ebp, dword [esp + 0x4c]
mov ebx, eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [esp + 0x54]
imul eax, esi
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x5c]
test eax, eax
push edi
mov edi, ecx
jne 0x59d7aa
mov ecx, dword [esp + 0x64]
xor eax, eax
test ecx, ecx
setne al
dec eax
and eax, 3
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x68]
test eax, eax
je 0x59d7bd
mov dword [esp + 0x20], 1
jmp 0x59d7bd
mov eax, dword [esp + 0x64]
xor ecx, ecx
test eax, eax
sete cl
lea ecx, [ecx + ecx + 2]
mov dword [esp + 0x20], ecx
movsx eax, word [edx + 4]
movsx ecx, word [edx + 0x10]
add eax, edi
add ecx, edi
movsx edi, word [edx]
movsx edx, word [edx + 2]
add edi, ebx
test esi, esi
lea ebx, [edx + ebx - 1]
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebx
jle 0x59d7f8
movsx edx, word [edx + 6]
sub edx, dword [ebp + 4]
dec edx
jmp 0x59d801
movsx esi, word [edx + 4]
mov edx, dword [ebp + 4]
sub edx, esi
add edx, edi
cmp ebx, edx
jle 0x59d80b
mov dword [esp + 0x28], edx
mov ebx, eax
and ebx, 0x1f
mov ebp, dword [ebx*4 + 0x682b28]
mov dword [esp + 0x3c], ebx
mov ebx, ecx
mov esi, eax
sar esi, 5
mov edx, ecx
and ebx, 0x1f
mov ebx, dword [ebx*4 + 0x682ba8]
sar edx, 5
sub edx, esi
test ebx, ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x60], edx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebx
jne 0x59d858
mov dword [esp + 0x18], 0xffffffff
mov ebx, dword [esp + 0x18]
dec edx
mov dword [esp + 0x60], edx
test edx, edx
jne 0x59d866
and ebp, ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
cmp edi, dword [esp + 0x28]
jg 0x59dfa0
jmp 0x59d882
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x64]
push ecx
test edx, edx
mov edx, dword [esp + 0x54]
mov ebx, dword [edx + 4]
push eax
push edi
je 0x59d89d
mov eax, dword [edx + 8]
push eax
call dword [ebx + 4]
jmp 0x59d8a3
mov ecx, dword [edx + 8]
push ecx
call dword [ebx]
mov edx, dword [esp + 0x64]
mov edx, dword [edx + 8]
mov ebp, edx
and ebp, 3
lea eax, [eax + esi*4]
sub edx, ebp
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx edi, byte [ecx + 0x685eb0]
shr esi, 8
xor ecx, ecx
mov ebx, esi
and ebx, 0xff
mov ch, byte [ebx + 0x685eb0]
shr esi, 8
mov ebx, esi
shr ebx, 8
and esi, 0xff
add esp, 0x10
add edx, 4
or edi, ecx
xor ecx, ecx
mov ch, byte [ebx + 0x685eb0]
mov ebx, dword [esp + 0x3c]
mov cl, byte [esi + 0x685eb0]
shl ecx, 0x10
or edi, ecx
lea ecx, [ebp*8]
sub ebx, ecx
mov ecx, dword [esp + 0x54]
sub ebx, dword [ecx + 0xc]
jns 0x59d988
mov ebp, dword [edx]
mov ecx, ebx
neg ecx
mov dword [esp + 0x14], ecx
mov ecx, ebp
and ecx, 0xff
movzx esi, byte [ecx + 0x685eb0]
shr ebp, 8
mov dword [esp + 0x10], ebp
xor ecx, ecx
and ebp, 0xff
mov ch, byte [ebp + 0x685eb0]
mov ebp, dword [esp + 0x10]
shr ebp, 8
mov dword [esp + 0x10], ebp
shr ebp, 8
add ebx, 0x20
add edx, 4
or esi, ecx
xor ecx, ecx
mov ch, byte [ebp + 0x685eb0]
mov ebp, dword [esp + 0x10]
and ebp, 0xff
mov cl, byte [ebp + 0x685eb0]
shl ecx, 0x10
or esi, ecx
mov ecx, dword [esp + 0x14]
shr edi, cl
mov ebp, esi
mov ecx, ebx
shl ebp, cl
or edi, ebp
jmp 0x59d999
mov ecx, 0x20
sub ecx, ebx
mov dword [esp + 0x14], ecx
mov ecx, ebx
mov esi, edi
shl edi, cl
mov ecx, dword [esp + 0x20]
cmp ecx, 4
mov ebp, dword [esp + 0x1c]
ja case.default.0x59d9aa
jmp dword [ecx*4 + 0x59dfa8]
and edi, ebp
test ebx, ebx
jne 0x59da2b
mov ebp, dword [esp + 0x60]
test ebp, ebp
jle 0x59daa7
or dword [eax], edi
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx edi, byte [ecx + 0x685eb0]
xor ecx, ecx
shr esi, 8
mov ebx, esi
and ebx, 0xff
mov ch, byte [ebx + 0x685eb0]
shr esi, 8
add eax, 4
add edx, 4
or edi, ecx
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
shl ecx, 0x10
or edi, ecx
shr esi, 8
movzx ecx, byte [esi + 0x685eb0]
shl ecx, 0x18
or edi, ecx
dec ebp
jne 0x59d9c3
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59d9aa
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x59daa7
mov dword [esp + 0x2c], ecx
or dword [eax], edi
mov edi, dword [edx]
mov ecx, edi
and ecx, 0xff
shr edi, 8
mov ebp, edi
mov dword [esp + 0x10], esi
movzx esi, byte [ecx + 0x685eb0]
xor ecx, ecx
and ebp, 0xff
mov ch, byte [ebp + 0x685eb0]
shr edi, 8
mov ebp, edi
shr ebp, 8
and edi, 0xff
add eax, 4
add edx, 4
or esi, ecx
xor ecx, ecx
mov ch, byte [ebp + 0x685eb0]
mov cl, byte [edi + 0x685eb0]
mov edi, dword [esp + 0x10]
shl ecx, 0x10
or esi, ecx
mov ecx, dword [esp + 0x14]
shr edi, cl
mov ecx, ebx
mov ebp, esi
shl ebp, cl
mov ecx, dword [esp + 0x2c]
or edi, ebp
dec ecx
mov dword [esp + 0x2c], ecx
jne 0x59da37
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59d9aa
not edi
and edi, ebp
test ebx, ebx
not esi
jne 0x59db3c
mov ebp, dword [esp + 0x60]
test ebp, ebp
jle 0x59dbd8
mov edi, edi
or dword [eax], edi
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx edi, byte [ecx + 0x685eb0]
xor ecx, ecx
shr esi, 8
mov ebx, esi
and ebx, 0xff
mov ch, byte [ebx + 0x685eb0]
shr esi, 8
add eax, 4
add edx, 4
or edi, ecx
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
shl ecx, 0x10
or edi, ecx
shr esi, 8
movzx ecx, byte [esi + 0x685eb0]
shl ecx, 0x18
or ecx, edi
dec ebp
not ecx
mov edi, ecx
jne 0x59dad0
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59d9aa
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x59dbd8
mov dword [esp + 0x2c], ecx
lea esp, [esp]
or dword [eax], edi
mov edi, esi
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
shr esi, 8
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov ebp, esi
and ebp, 0xff
mov ch, byte [ebp + 0x685eb0]
mov ebp, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x40], eax
shr esi, 8
xor eax, eax
add edx, 4
or ebp, ecx
mov ecx, esi
shr ecx, 8
mov ah, byte [ecx + 0x685eb0]
mov ecx, dword [esp + 0x14]
and esi, 0xff
shr edi, cl
mov dword [esp + 0x10], ebp
mov ecx, ebx
mov al, byte [esi + 0x685eb0]
mov esi, ebp
shl eax, 0x10
or eax, esi
not eax
mov esi, eax
mov eax, dword [esp + 0x2c]
mov ebp, esi
shl ebp, cl
or edi, ebp
dec eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x40]
jne 0x59db50
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59d9aa
mov ebp, dword [esp + 0x68]
xor ecx, ecx
test ebp, ebp
setne cl
dec ecx
mov ebp, ecx
xor ecx, edi
mov edi, dword [esp + 0x1c]
not edi
xor esi, ebp
or ecx, edi
test ebx, ebx
mov dword [esp + 0x40], ebp
jne 0x59dc90
mov esi, dword [esp + 0x60]
test esi, esi
jle 0x59dd2e
mov dword [esp + 0x2c], esi
nop
and dword [eax], ecx
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx edi, byte [ecx + 0x685eb0]
xor ecx, ecx
shr esi, 8
mov ebx, esi
and ebx, 0xff
mov ch, byte [ebx + 0x685eb0]
shr esi, 8
add eax, 4
add edx, 4
or edi, ecx
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
shl ecx, 0x10
or edi, ecx
shr esi, 8
movzx ecx, byte [esi + 0x685eb0]
mov esi, dword [esp + 0x2c]
shl ecx, 0x18
or ecx, edi
xor ecx, ebp
dec esi
mov dword [esp + 0x2c], esi
jne 0x59dc20
mov edx, dword [esp + 0x18]
not edx
or edx, ecx
and dword [eax], edx
jmp case.default.0x59d9aa
mov edi, dword [esp + 0x60]
test edi, edi
jle 0x59dd2e
mov dword [esp + 0x2c], edi
and dword [eax], ecx
mov edi, esi
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
mov dword [esp + 0x10], ecx
shr esi, 8
xor ecx, ecx
mov ebp, esi
and ebp, 0xff
mov ch, byte [ebp + 0x685eb0]
mov ebp, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x44], eax
shr esi, 8
xor eax, eax
add edx, 4
or ebp, ecx
mov ecx, esi
shr ecx, 8
mov ah, byte [ecx + 0x685eb0]
mov ecx, dword [esp + 0x40]
and esi, 0xff
mov dword [esp + 0x10], ebp
mov al, byte [esi + 0x685eb0]
mov esi, ebp
shl eax, 0x10
or eax, esi
xor eax, ecx
mov ecx, dword [esp + 0x14]
mov esi, eax
mov eax, dword [esp + 0x2c]
shr edi, cl
mov ecx, ebx
mov ebp, esi
shl ebp, cl
or edi, ebp
dec eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x44]
mov ecx, edi
jne 0x59dca0
mov edx, dword [esp + 0x18]
not edx
or edx, ecx
and dword [eax], edx
jmp case.default.0x59d9aa
mov ecx, dword [eax]
not ebp
and ebp, ecx
and edi, dword [esp + 0x1c]
or ebp, edi
test ebx, ebx
jne 0x59ddbc
mov edi, dword [esp + 0x60]
test edi, edi
jle 0x59df5d
lea esp, [esp]
mov dword [eax], ebp
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx ebp, byte [ecx + 0x685eb0]
xor ecx, ecx
shr esi, 8
mov ebx, esi
and ebx, 0xff
mov ch, byte [ebx + 0x685eb0]
shr esi, 8
add eax, 4
add edx, 4
or ebp, ecx
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
shl ecx, 0x10
or ebp, ecx
shr esi, 8
movzx ecx, byte [esi + 0x685eb0]
shl ecx, 0x18
or ebp, ecx
dec edi
jne 0x59dd60
jmp 0x59df5d
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x59df5d
mov dword [esp + 0x2c], ecx
lea esp, [esp]
mov dword [eax], ebp
mov ebp, dword [edx]
mov ecx, ebp
and ecx, 0xff
shr ebp, 8
mov edi, ebp
mov dword [esp + 0x10], esi
movzx esi, byte [ecx + 0x685eb0]
xor ecx, ecx
and edi, 0xff
mov ch, byte [edi + 0x685eb0]
shr ebp, 8
mov edi, ebp
shr edi, 8
and ebp, 0xff
add eax, 4
add edx, 4
or esi, ecx
xor ecx, ecx
mov ch, byte [edi + 0x685eb0]
mov cl, byte [ebp + 0x685eb0]
mov ebp, dword [esp + 0x10]
shl ecx, 0x10
or esi, ecx
mov ecx, dword [esp + 0x14]
shr ebp, cl
mov ecx, ebx
mov edi, esi
shl edi, cl
mov ecx, dword [esp + 0x2c]
or ebp, edi
dec ecx
mov dword [esp + 0x2c], ecx
jne 0x59ddd0
jmp 0x59df5d
mov ecx, dword [eax]
not ebp
and ebp, ecx
mov ecx, dword [esp + 0x1c]
not edi
and edi, ecx
or ebp, edi
test ebx, ebx
not esi
jne 0x59dec5
mov edi, dword [esp + 0x60]
test edi, edi
not ebp
jle 0x59debe
not ebp
mov dword [eax], ebp
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx ebp, byte [ecx + 0x685eb0]
xor ecx, ecx
shr esi, 8
mov ebx, esi
and ebx, 0xff
mov ch, byte [ebx + 0x685eb0]
shr esi, 8
add eax, 4
add edx, 4
or ebp, ecx
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
shl ecx, 0x10
or ebp, ecx
shr esi, 8
movzx ecx, byte [esi + 0x685eb0]
shl ecx, 0x18
or ebp, ecx
dec edi
jne 0x59de65
not ebp
jmp 0x59df5d
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x59df5d
mov dword [esp + 0x2c], ecx
mov dword [eax], ebp
mov ebp, esi
mov esi, dword [edx]
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + 0x685eb0]
shr esi, 8
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov edi, esi
and edi, 0xff
mov ch, byte [edi + 0x685eb0]
mov edi, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x44], eax
shr esi, 8
xor eax, eax
add edx, 4
or edi, ecx
mov ecx, esi
shr ecx, 8
mov ah, byte [ecx + 0x685eb0]
mov ecx, dword [esp + 0x14]
and esi, 0xff
shr ebp, cl
mov dword [esp + 0x10], edi
mov ecx, ebx
mov al, byte [esi + 0x685eb0]
mov esi, edi
shl eax, 0x10
or eax, esi
not eax
mov esi, eax
mov eax, dword [esp + 0x2c]
mov edi, esi
shl edi, cl
or ebp, edi
dec eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x44]
jne 0x59ded5
mov ecx, dword [esp + 0x18]
mov edi, dword [eax]
mov edx, ecx
not edx
and edx, edi
and ebp, ecx
or edx, ebp
mov dword [eax], edx
mov eax, dword [esp + 0x54]
mov edi, dword [eax + 8]
mov esi, dword [eax + 4]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x58]
add edi, ecx
mov ecx, dword [esp + 0x28]
add esi, edx
mov dword [eax + 8], edi
mov dword [eax + 4], esi
mov eax, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jle 0x59d872
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret