Function at 0x59dfc0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push ebx
mov ebx, dword [esp + 0x44]
push ebp
mov ebp, dword [esp + 0x50]
push esi
mov esi, dword [esp + 0x44]
push edi
mov edi, edx
mov edx, dword [esp + 0x4c]
mov edx, dword [edx + 0x10]
imul edx, ebx
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x54]
test edx, edx
jne 0x59e00c
xor edx, edx
test ebp, ebp
setne dl
dec edx
and edx, 3
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x5c]
test edx, edx
je 0x59e01b
mov dword [esp + 0x1c], 1
jmp 0x59e01b
xor edx, edx
test ebp, ebp
sete dl
lea edx, [edx + edx + 2]
mov dword [esp + 0x1c], edx
movsx edx, word [eax + 4]
movsx ebp, word [eax + 0x10]
add edx, esi
add ebp, esi
movsx esi, word [eax]
movsx eax, word [eax + 2]
add esi, ecx
test ebx, ebx
lea ecx, [eax + ecx - 1]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ecx
jle 0x59e056
movsx eax, word [edi + 6]
mov edi, dword [esp + 0x4c]
sub eax, dword [edi + 4]
dec eax
jmp 0x59e063
movsx edi, word [edi + 4]
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 4]
sub eax, edi
add eax, esi
cmp ecx, eax
jle 0x59e06d
mov dword [esp + 0x24], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [eax*4 + 0x682b28]
mov dword [esp + 0x34], eax
mov eax, ebp
mov edi, edx
sar edi, 5
mov ebx, ebp
and eax, 0x1f
mov eax, dword [eax*4 + 0x682ba8]
sar ebx, 5
sub ebx, edi
test eax, eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x10], eax
jne 0x59e0b6
dec ebx
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x48], ebx
test ebx, ebx
jne 0x59e0c6
and ecx, dword [esp + 0x10]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x10], ecx
cmp esi, dword [esp + 0x24]
jg 0x59e624
jmp 0x59e0e2
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x58]
push ebp
push edx
test eax, eax
mov eax, dword [esp + 0x4c]
mov edx, dword [eax + 8]
mov ecx, dword [eax + 4]
push esi
push edx
je 0x59e0fd
call dword [ecx + 4]
jmp 0x59e0ff
call dword [ecx]
mov ecx, dword [esp + 0x5c]
mov esi, dword [ecx + 8]
mov ebp, esi
xor edx, edx
and ebp, 3
sub esi, ebp
mov ecx, dword [esi]
mov dh, cl
lea eax, [eax + edi*4]
shr ecx, 8
add esp, 0x10
sub esi, 4
mov edi, edx
mov edx, ecx
and edx, 0xff
or edx, edi
shr ecx, 8
mov edi, ecx
shl edx, 8
and edi, 0xff
or edi, edx
shr ecx, 8
shl edi, 8
or edi, ecx
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx + 0xc]
lea ecx, [edx + ebp*8]
mov edx, dword [esp + 0x34]
lea ebp, [ecx + edx - 0x1f]
test ebp, ebp
jge 0x59e1bc
mov edx, dword [esi]
xor ebx, ebx
mov bh, dl
shr edx, 8
mov dword [esp + 0x18], edx
mov ecx, ebp
neg ecx
add ebp, 0x20
shr edi, cl
mov dword [esp + 0x38], ebx
mov ebx, edx
mov edx, dword [esp + 0x38]
and ebx, 0xff
or ebx, edx
mov edx, dword [esp + 0x18]
shr edx, 8
shl ebx, 8
mov dword [esp + 0x18], edx
and edx, 0xff
or edx, ebx
mov ebx, dword [esp + 0x18]
shr ebx, 8
shl edx, 8
or edx, ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x14], ecx
mov ebx, edx
mov ecx, ebp
shl ebx, cl
sub esi, 4
or edi, ebx
mov ebx, dword [esp + 0x48]
jmp 0x59e1cd
mov ecx, 0x20
sub ecx, ebp
mov dword [esp + 0x14], ecx
mov ecx, ebp
mov edx, edi
shl edi, cl
mov ecx, dword [esp + 0x1c]
cmp ecx, 4
ja case.default.0x59e1da
jmp dword [ecx*4 + 0x59e62c]
and edi, dword [esp + 0x54]
test ebp, ebp
jne 0x59e23c
test ebx, ebx
jle 0x59e36a
mov ebp, ebx
or dword [eax], edi
mov ecx, dword [esi]
xor edx, edx
mov dh, cl
shr ecx, 8
add eax, 4
sub esi, 4
mov edi, edx
mov edx, ecx
and edx, 0xff
or edx, edi
shr ecx, 8
mov edi, ecx
and edi, 0xff
shl edx, 8
or edi, edx
shl edi, 8
shr ecx, 8
or edi, ecx
dec ebp
jne 0x59e1f3
mov edx, dword [esp + 0x10]
mov ecx, dword [eax]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59e1da
test ebx, ebx
jle 0x59e36a
mov dword [esp + 0x18], ebx
or dword [eax], edi
mov ecx, dword [esi]
xor ebx, ebx
mov bh, cl
shr ecx, 8
mov edi, edx
mov edx, ecx
shr ecx, 8
and edx, 0xff
add eax, 4
or edx, ebx
mov ebx, ecx
and ebx, 0xff
shl edx, 8
or ebx, edx
shr ecx, 8
shl ebx, 8
or ebx, ecx
mov ecx, dword [esp + 0x14]
shr edi, cl
mov ecx, ebp
mov edx, ebx
shl ebx, cl
mov ecx, dword [esp + 0x18]
sub esi, 4
or edi, ebx
dec ecx
mov dword [esp + 0x18], ecx
jne 0x59e248
mov edx, dword [esp + 0x10]
mov ecx, dword [eax]
mov ebx, dword [esp + 0x48]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59e1da
mov ecx, dword [esp + 0x54]
not edi
and edi, ecx
test ebp, ebp
not edx
jne 0x59e30e
test ebx, ebx
jle 0x59e36a
mov ebp, ebx
or dword [eax], edi
mov edx, dword [esi]
xor ecx, ecx
mov ch, dl
shr edx, 8
mov edi, edx
and edi, 0xff
shr edx, 8
add eax, 4
sub esi, 4
or edi, ecx
mov ecx, edx
and ecx, 0xff
shl edi, 8
or ecx, edi
shl ecx, 8
shr edx, 8
or ecx, edx
dec ebp
not ecx
mov edi, ecx
jne 0x59e2c3
mov edx, dword [esp + 0x10]
mov ecx, dword [eax]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59e1da
test ebx, ebx
jle 0x59e36a
mov dword [esp + 0x18], ebx
or dword [eax], edi
mov ecx, dword [esi]
xor ebx, ebx
mov bh, cl
shr ecx, 8
mov edi, edx
mov edx, ecx
shr ecx, 8
and edx, 0xff
add eax, 4
or edx, ebx
mov ebx, ecx
and ebx, 0xff
shl edx, 8
or ebx, edx
shr ecx, 8
shl ebx, 8
or ebx, ecx
mov ecx, dword [esp + 0x14]
shr edi, cl
not ebx
mov ecx, ebp
mov edx, ebx
shl ebx, cl
mov ecx, dword [esp + 0x18]
sub esi, 4
or edi, ebx
dec ecx
mov dword [esp + 0x18], ecx
jne 0x59e316
mov ebx, dword [esp + 0x48]
mov edx, dword [esp + 0x10]
mov ecx, dword [eax]
and edi, edx
or ecx, edi
mov dword [eax], ecx
jmp case.default.0x59e1da
mov ecx, dword [esp + 0x5c]
xor ebx, ebx
test ecx, ecx
setne bl
dec ebx
mov ecx, ebx
xor ecx, edi
mov edi, dword [esp + 0x54]
not edi
xor edx, ebx
or ecx, edi
test ebp, ebp
mov dword [esp + 0x38], ebx
jne 0x59e3ee
mov ebp, dword [esp + 0x48]
test ebp, ebp
jle 0x59e453
lea esp, [esp]
mov edi, dword [eax]
and edi, ecx
xor ecx, ecx
mov dword [eax], edi
mov edx, dword [esi]
mov ch, dl
shr edx, 8
mov edi, edx
and edi, 0xff
shr edx, 8
add eax, 4
sub esi, 4
or edi, ecx
mov ecx, edx
and ecx, 0xff
shl edi, 8
or ecx, edi
shl ecx, 8
shr edx, 8
or ecx, edx
xor ecx, ebx
dec ebp
jne 0x59e3b0
jmp 0x59e453
mov edi, dword [esp + 0x48]
test edi, edi
jle 0x59e453
mov dword [esp + 0x18], edi
lea ebx, [ebx]
mov edi, dword [eax]
and edi, ecx
xor ebx, ebx
mov dword [eax], edi
mov ecx, dword [esi]
mov bh, cl
shr ecx, 8
mov edi, edx
mov edx, ecx
shr ecx, 8
and edx, 0xff
add eax, 4
or edx, ebx
mov ebx, ecx
and ebx, 0xff
shl edx, 8
or ebx, edx
shr ecx, 8
shl ebx, 8
or ebx, ecx
xor ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
shr edi, cl
mov ecx, ebp
mov edx, ebx
shl ebx, cl
sub esi, 4
or edi, ebx
mov ecx, edi
dec dword [esp + 0x18]
jne 0x59e400
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x48]
not edx
or edx, ecx
and dword [eax], edx
jmp case.default.0x59e1da
mov ebx, dword [esp + 0x54]
mov ecx, ebx
not ecx
and ecx, dword [eax]
and edi, ebx
or ecx, edi
test ebp, ebp
jne 0x59e4c3
mov ebp, dword [esp + 0x48]
test ebp, ebp
jle 0x59e5dd
mov dword [eax], ecx
mov edx, dword [esi]
xor ecx, ecx
mov ch, dl
shr edx, 8
add eax, 4
sub esi, 4
mov edi, ecx
mov ecx, edx
and ecx, 0xff
or ecx, edi
shr edx, 8
shl ecx, 8
mov edi, edx
and edi, 0xff
or edi, ecx
shl edi, 8
shr edx, 8
mov ecx, edi
or ecx, edx
dec ebp
jne 0x59e484
jmp 0x59e5dd
mov edi, dword [esp + 0x48]
test edi, edi
jle 0x59e5dd
mov dword [esp + 0x18], edi
mov dword [eax], ecx
mov ecx, dword [esi]
xor ebx, ebx
mov bh, cl
shr ecx, 8
mov edi, edx
mov edx, ecx
shr ecx, 8
and edx, 0xff
add eax, 4
or edx, ebx
mov ebx, ecx
and ebx, 0xff
shl edx, 8
or ebx, edx
shr ecx, 8
shl ebx, 8
or ebx, ecx
mov ecx, dword [esp + 0x14]
shr edi, cl
mov ecx, ebp
mov edx, ebx
shl ebx, cl
sub esi, 4
or edi, ebx
mov ecx, edi
dec dword [esp + 0x18]
jne 0x59e4d3
jmp 0x59e5dd
mov ecx, dword [esp + 0x54]
not ecx
and ecx, dword [eax]
not edi
and edi, dword [esp + 0x54]
not edx
or ecx, edi
test ebp, ebp
jne 0x59e581
test ebx, ebx
not ecx
jle 0x59e57d
mov ebp, ebx
not ecx
mov dword [eax], ecx
mov edx, dword [esi]
xor ecx, ecx
mov ch, dl
shr edx, 8
add eax, 4
sub esi, 4
mov edi, ecx
mov ecx, edx
and ecx, 0xff
or ecx, edi
shr edx, 8
shl ecx, 8
mov edi, edx
and edi, 0xff
or edi, ecx
shl edi, 8
shr edx, 8
mov ecx, edi
or ecx, edx
dec ebp
jne 0x59e541
not ecx
jmp 0x59e5e1
test ebx, ebx
jle 0x59e5e1
mov dword [esp + 0x18], ebx
lea esp, [esp]
xor ebx, ebx
mov dword [eax], ecx
mov ecx, dword [esi]
mov bh, cl
shr ecx, 8
mov edi, edx
mov edx, ecx
shr ecx, 8
and edx, 0xff
add eax, 4
or edx, ebx
mov ebx, ecx
and ebx, 0xff
shl edx, 8
or ebx, edx
shr ecx, 8
shl ebx, 8
or ebx, ecx
mov ecx, dword [esp + 0x14]
shr edi, cl
not ebx
mov ecx, ebp
mov edx, ebx
shl ebx, cl
sub esi, 4
or edi, ebx
mov ecx, edi
dec dword [esp + 0x18]
jne 0x59e590
mov ebx, dword [esp + 0x48]
mov edx, dword [esp + 0x10]
mov ebp, dword [eax]
mov esi, edx
not esi
and esi, ebp
and ecx, edx
or esi, ecx
mov dword [eax], esi
mov eax, dword [esp + 0x4c]
mov edi, dword [eax + 8]
mov esi, dword [eax + 4]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x3c]
add esi, ecx
mov ecx, dword [esp + 0x24]
add edi, edx
mov dword [eax + 8], edi
mov dword [eax + 4], esi
mov eax, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jle 0x59e0d2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret